-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Exception on saving of Unmanaged Object with Embedded Object #6921
Comments
I am surprised no one is assigned to this issue. Getting the same problem here. This makes it very inconvenient to work with embedded objects. In my case there are two levels, which makes it even worse. It also differs from the behavior in the Android SDK. |
This is specifically related to |
Any news on this? I've changed some models to benefit from embedded objects only to have the app crash all over now because of this :/ |
I fixed this in my app by converting the object to a dictionary/json representation and then using that as the parameter for value in |
@onelogapp so this is a work in progress yet, right? in my case, i get |
Crash during upsert of an existing object with a list of EmbeddedObject inside.
Goals / Expected Results
I can upsert a record.
Actual Results
Exception: ** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot add an existing managed embedded object to a List.'**
Steps for others to Reproduce
Create unmanaged copy of existing object with the property - list of EmbeddedObject's children objects.
Try to add it with
UpdatePolicy.update
Workaround
Create a deep copy of a target object.
Code Sample
Stack trace
Version of Realm and Tooling
Realm framework version: 10.1.2
Xcode version: 12
iOS/OSX version: 14
Dependency manager + version: SPM
The text was updated successfully, but these errors were encountered: