-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem of EmbeddedObject nested collection binding (.net Xamarin Forms) #2840
Comments
Can you share your project? |
|
You can't have multiple objects referencing the same embedded object. In your repository you're adding the same track to multiple albums and the same album to multiple artists. |
That not the case! It is not possible even to add same instance of embedded object to multiple realms! That why there is deep cloning at the and of repository GetData() function . My repository is just for mimic web API response that return deserialized JSON data as unmanaged RealmObject. To convince you, just updated my project to more straight forward repository. |
My bad - I misunderstood where the original problem was manifesting. I can see the actual issue now and it seems to be databinding related. Should be simple to workaround. (Also, sorry if you had already shared your project in the first post - the Github mobile app sometimes truncates messages and must have missed it.) |
➤ Andrea Catalini commented: Fixed by #2841 |
@nirinchev Do you know when will be available new Realm Nuget package with this fix? I have the same issue, app is crashing & i don't know how to make workaround :( |
We're wrapping up a few in-flight PRs and will do a release shortly after. Either this week or early next one. |
Discussed in #2839
Originally posted by aliegeni March 6, 2022
Despite official docs says: "You can use the same embedded object type in multiple parent object types and you can embed objects inside of other embedded objects."
You get the RealmInvalidObjectException: "Can't enumerate the collection because it was deleted or the Realm it is contained in has been closed." when trying to update parent RealmObject with EmbededObject member witch has inside List of other embedded objects.
That makes "live" data binding impossible in Xamarin Forms! Is there any workaround?
Project to reproduce the issue.
https://github.com/aliegeni/RealmXamarinTest
The text was updated successfully, but these errors were encountered: