Hello there, I’m working on a .NET 5 application and I’m using Realm (from nuget) 10.4.0 which is the latest version available as of today. The doc is very clear and there is no bug.
We’re designing a local oriented application (it is intended to run on a Windows Machine without internet most of the time).
Sometimes when the user has internet, he can click on a button to Sync the local .realm file.
I need to access the .realm file and I don’t need to get data from the Synced realm, I just need to upload data from the Local to the Sync.
Currently I’m using a RealmConfiguration locally and when the user press the button I’m launching a function to create a SyncConfiguration and copy everything from the local realm to the synced realm. (Trying to reproduce this schema: Add Sync to a Local-Only App — MongoDB Realm
However when trying to add an object to Synced Realm the object from the Local Realm it throw an exception (Cannot start to manage an object with a realm when it’s already managed by another realm)
- I don’t know how to be sure that the object I’m adding from the local to the sync will update the current one (if it exists in Sync) or create a copy (which is a problem)
So I’m asking if myself I truly understand the Local to Sync concept, and if I get something wrong can you please help me.
Thank you very much