When creating an object that has a primaryKey, does Realm provide a method to get / create next available unique value of a primary key? ( Auto-Increment )
const BookSchema = {
name: 'Book',
primaryKey: 'id',
properties: {
id: 'int', // primary key
title: 'string',
price: 'float'
}
};
If not what are approaches to insuring value of primaryKey is unique?
Or should I make primary key a uuid: { type: 'string' } ?
Using:
- react native 0.38.1
- Android
- iOS
- realm 0.15.0