realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.01k stars 155 forks source link

Add flexible sync support to `Realm::convert` #5711

Open leemaguire opened 2 years ago

leemaguire commented 2 years ago

Describe your problem or use case

Currently converting a local realm to a synced realm is only supported when using PBS. When trying to use the Realm::convert feature with flexible sync you get errors in the sync logs stating "cannot write to table \"SomeObject\" before opening a subscription on it"

e.g:

"reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"},{"table":"SwiftPerson","pk":"CmLrrE73Z7Qtrc8+yQ==","reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"},{"table":"SwiftPerson","pk":"CmLrrE73Z7Qtrc8+vg==","reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"}]}

Describe the solution you'd like

There is a discussion on slack with possible solutions to this request, but basically:

sync-by-unito[bot] commented 1 year ago

➤ Brian Munkholm commented:

Realm JS has had requests for this.