You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application uses two separate Realm instances (the second comes from a library).
The application itself uses Realm.Configuration.defaultConfuguration and the library creates its own configuration (Realm.Configuration(...)).
On runtime (after inspecting with Realm Browser), I see that both instances (each live in its own file) contain the models from both Realms. This, of course, has implications on migrations.
I know that when both use the same configuration we should set configuration.objectTypes, but I didn't expect it to matter when each instance has its own configuration.
How can two distinct configs share any data between them? It seems like a bug in Realm - or maybe I'm missing something.
The text was updated successfully, but these errors were encountered:
By default objectTypes will include all RealmSwift.Object subclasses, regardless of where they are defined.
A library which uses Realm should override shouldIncludeInDefaultSchema() to exclude its types from the default objectTypes (i.e. add public override class func shouldIncludeInDefaultSchema() -> Bool { return false } to the class definitions) and then explicitly list the types it uses. This lets any applications using the library continue to simply use the automatic class discovery.
Also posted on SO, but no response so far.
My application uses two separate Realm instances (the second comes from a library).
The application itself uses Realm.Configuration.defaultConfuguration and the library creates its own configuration (Realm.Configuration(...)).
On runtime (after inspecting with Realm Browser), I see that both instances (each live in its own file) contain the models from both Realms. This, of course, has implications on migrations.
I know that when both use the same configuration we should set configuration.objectTypes, but I didn't expect it to matter when each instance has its own configuration.
How can two distinct configs share any data between them? It seems like a bug in Realm - or maybe I'm missing something.
The text was updated successfully, but these errors were encountered: