These are some things we discovered during a POC. Maybe ‘everyone knows, nobody tells?’
Any corrections and suggestions are welcome.
- app.CurrentUser is persisted on disk. No need to use LoginAsync after a single initial login. Use sync Realm with Realm.GetInstance(config) where config is SyncConfiguration(partitionKey, user) for flawless data sync, offline-first.
- In .Net at least, all models that inherit from RealmObject should be located in the same project (assembly) where data access happens. If not your models will not be known to Realm.
- Cannot use RealmObjects as models to transmit data over HTTP. You need to create POCOs and copy over data from RealmObject-derived models
- Always have one global Realm and configuration. Use Realm for read/write requests with GetInstance(config) and dispose. The global Realm ensures that changes upstream at Atlas are listened to and local storage is updated. In the absence of a global Realm, models are only updated when ‘read’.