NewRealm.All returns collection with nullable ID-s in the migration function #2521
-
Hello. Recently I have modified my project's entities to be able to support realm sync. I have added PartitionKey in the all realm objects and have added a new migration function (Scheme version let's say 4) supporting that functionality. Also I have many migration functions for different already refactored cases. Now I am running app on old instance of database and when the previous migration functions start (Let's say functions for schema versions 1, 2, 3) then the newRealm.All<...>() method returns realm objects with nullable ID-s. So the question is what is wrong there?. Did I missing something? p.s. I am using the latest versions of Realm, Xamarin, Fody Nuget packages. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @vardansargsyan92, would it be possible for you to post the migration function to see exactly what you're doing? It's a little bit difficult to judge what is happening otherwise. As a separate note, I don't know if you're aware of it, but when you decide to use sync unfortunately you can't simply use a migration, but would need to copy the objects manually to the sync realm. That happens because local realms and synced ones are not compatible with each other. |
Beta Was this translation helpful? Give feedback.
Hi @vardansargsyan92, would it be possible for you to post the migration function to see exactly what you're doing? It's a little bit difficult to judge what is happening otherwise.
As a separate note, I don't know if you're aware of it, but when you decide to use sync unfortunately you can't simply use a migration, but would need to copy the objects manually to the sync realm. That happens because local realms and synced ones are not compatible with each other.