realm-kotlin
realm-kotlin copied to clipboard
UPDATE instruction had incorrect partition value for key "_partition" { expectedPartition: xxx, foundPartition: (ProtocolErrorCode=212)
Hi everyone, somehow my app has saved some wrong partition for some users, but we can't lose all those data with wrong partitions.
When the app tries to sync the data, it gets an error:
UPDATE instruction had incorrect partition value for key "_partition" { expectedPartition: xxx, foundPartition: (ProtocolErrorCode=212)
But some partitions are correctly and already on server.
How can i update the partition on a local data and sync it to server?
I am afraid you cannot just update the partition key. You would need to move the data manually from the wrong partitioned Realm to a Realm with the right partition key.
To do so, you will need to:
- create two different SyncConfigurations each with a partition key
- open a Realm instance on each configuration
- copy the data
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.