realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

realm anotation for syncing schema independent

Open idok595 opened this issue 9 years ago • 2 comments

i am working with realm syncing however it look like it is impossible to work with schema that are diffrent from the sync server, i suggesting to create anotation or someting to notify realm that this feild/table is only for local usage and should not be used as a part of the syncing schema so user can change/insert/delete(in case of table) without any impact/permmision on the server, only local changes, it can be very usefull.

idok595 avatar Jun 04 '17 08:06 idok595

Huh? What do you mean "only local changes"? Sync mode means that all changes are reflected across all devices that belongs to the user, orchestrated by the ROS that is the single source of truth.

With that in mind, there is no such thing as a "local change" in context of a sync realm.

Zhuinden avatar Jun 04 '17 11:06 Zhuinden

  • There's no partial sync of the schema.

  • Sync support additive changes (adding new table/column to the schema)

  • Nothing prevents you from creating two Realms in your app: one local (not synced) and one Synced using RealmObjectServer, by registering a RealmChangeListener on the synced Realm you can listen to changes & react/reflect to them as you like in the local Realm for example.

nhachicha avatar Jun 05 '17 14:06 nhachicha