-
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
LinkingObjects empty for newly added objects #5598
Comments
I am experiencing this issue as well on Realm version 3.13.0 |
This bug is still present in 3.19.0. What's interesting: If you create a second child object and put it to the parent with the first child object, all is working as expected for the second child. |
Any updates or workarounds for this? Our app is facing this issue in several places. |
Okay, after further inspection, I can confirm that this is only happening on instances that were inserted into Realm. If you were to do a reload of that object, any |
I updated @humblehacker 's project to Swift 5, RealmSwift 4.4.1 and line 33 now shows expected results. If anyone is still seeing the issue after 4.3.0 (#6834), please comment. |
Goals
Access
LinkingObjects
on a new object added to a Realm.Expected results
After adding an object with a
LinkingObjects
property to a Realm, accessing theLinkingObjects
property returns the expected results.Actual results
The
LinkingObjects
property returns no results. Note that if I use an object retrieved from a Realm rather than the original object added to the Realm, theLinkingObjects
property works as expected.Steps to reproduce
LinkingObjects
property that points from child to parent.LinkingObjects
property on the child object.Code sample that highlights the issue
Playground project
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: