-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Relationships recover but not to the original parent class #238
Comments
Hi @mohitnandwani , really appreciate it for proposing this issue and I've noticed this bug as well. I'll take some time to fix it and will let you know. |
And I've found the CloudKit Console(which was CloudKit dashboard) always shows the below error message when I try to query records:
I've tried some ways to make it work but it failed. Have you guys encountered this problem? |
Hey @caiyue1993 , Thanks for your reply! Yeah it does show the error when querying records on CloudKit without any filter. What I usually do is to query records with "isDeleted" filter in the new console. Also it seems that the bug happen with the pendingRelationshipWorker appending relationship to random objects during the first sync. (Inside the CKRecordRecoverable, when its converting the CKReference to List). |
Hi @mohitnandwani , thanks for your suggestion! Now I can successfully query records in CloudKit Console. And I think I've found the reason behind this relationships recover issue. I've submitted PR #240. |
Hey @caiyue1993 👋🏽! Thank you so much for looking into this! Will definitely look into this and get back to you as soon as I can! |
@caiyue1993 I used your fix in the PR #240 yesterday, because i had the same problem as the OP! |
Thank you @elliotcz97! Sorry for the delayed response. Yes please give it a long term review and give us your feedback when you have time! |
@caiyue1993
Then after upload i could get:
And i think, for now, i cannot confirm it, but i have a feeling that my problem #242 has to do something with this. |
Hi @elliotcz97, yeah it may be the same cause. As for the rearranged elements it's acceptable. You could add index property onto every element to order them. |
@caiyue1993 thanks for your idea, i already did that ( giving index property). I hope you can find a solution for my issue too, Have a nice day. |
* fix issue caiyue1993#238 * bump version * add version control to RealmSwift dependency Co-authored-by: Yue Cai <[email protected]> Co-authored-by: Sol Cai <[email protected]>
I have the same problem with random reordering of list elements. Any solution for this? |
Expected behavior
Relationships should recover properly to the records/objects they belong.
Actual behavior
Relationships recover but not to the original parent class. Instead they get added to random objects and update records in CloudKit causing loss of original data.
Steps to reproduce the problem
• Use example to add data and sync it with CloudKit
• Uninstall the app and delete all files
• Reinstall app and let it recover data from CloudKit and you'll see relationships not recovering properly and get added to random objects
• Visit CloudKit dashboard and you'll find that your data is now updated with new/wrong relationships
The text was updated successfully, but these errors were encountered: