-
Notifications
You must be signed in to change notification settings - Fork 25
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
Sync with cascade delete rules #40
Comments
When you get the crash can you enter |
Can you try with the code from the repo and see if it has fixed your issue? |
What is your delete rule on the |
Nope, I have set it to cascade. Deleting Tables object should delete all TableSessions objects, referenced to this Table. This is rare case for users I believe, but valid. I want to keep the database clean. As per Apple documentation, it should work as expected - when I remove object from Tables entity, it will remove all TableSession objects for this table. But not all TableSessions objects.
|
Hello Paul |
Hi. I will look at this, but there have been a flurry of issues lately and I have my day job too :). |
Understood :-) Well, actually I don't have much time to create sample app too. But I can zip my workspace with project and send it to you with all required repro steps. (or can make it public here). Tell me if it will be okay for you, I'll try to do it tomorrow. We have 7 hours difference, so it will be T+1 for you. |
You can send me a zip file |
Hello Paul. Device: any Repro steps:
I have uploaded zip with my project and workspace. Hope you will not face any issues with it. BTW. I will really appreciate if you can take a look at my code and project as experienced developer and tell me how my code looks like. Is it good to read and understand? |
Hi Paul. Is it guaranteed that if I am getting conflict during sync, both conflicting records belong to the same Entity? I don't understand how recordID is being generated. |
Yes, the conflicts are detected by the Cloud Kit process, so it hasn't even got to Core Data yet. During the sync operation, Cloud Kit determines that its local copy of a record and the server copy of a record are in conflict. Seam3 simply applies the nominated conflict resolution policy to tell Cloud Kit what the resolved record should look like; either the server version, the local version or the version returned by the conflict resolution closure if that is the option selected. You will notice that the records passed to conflict resolution block are |
Hello Paul.
Can you please advise if Seam3 supports cascade delete rule? I have set cascade removal for my tables, works with no issues with CoreData itself, but sync fails with unwrapping optional value in some cases.
Code is pretty simple:
I have cascade deletion rule from Table to TableSession, and also from TableSession to 2 other entities. If it's needed to remove only one referenced object, for example from GuestsTable or OrdersTable - it works. If it's needed to remove 2 objects, one from GuestsTable, the second - from OrdersTable, it fails.
(For some reason GitHub cannot upload this screenshot.
https://imgur.com/a/dvXg7
The text was updated successfully, but these errors were encountered: