This issue started occurring after we added Unique key i.es Constraint.
Frequently updating Meeting managed object deletes the event managed object which has a to-one inverse relationship from meeting managed object.
Error CoreData: annotation: repairing missing delete propagation for to-many relationship meetingList on object 0x60c00009c4d0 (0x60c000621e40 ) with bad fault 0x60800009ac20 (0x60800023a360 )
Data Model
I have three entities in my core data model i.es
(CDEvent, CDMeeting, CDMLCheckin) .
Entity Properties and Relationship as described below:
Relationship
Properties: CDEvent CDMeeting
CDMLCheckin
Unique Constraint:
Relationship
Full Description : https://docs.google.com/document/d/1y2DQhBBLqjAP9eWbx5YpQhH7oVigxT_mcJDnPLlOMtQ/edit?usp=sharing
Note
Please help us here as we are struck from more than a week :(
I hope I can help, having a unique constraint with To-Many Relationship Entities you need to keep some points in mind
When you create NSManagedObjectContext make sure you set MergePolicy.
[_context setMergePolicy: mergePolicy];
NSMergeByPropertyStoreTrumpMergePolicy
NSMergeByPropertyObjectTrumpMergePolicy
NSOverwriteMergePolicy
Also could you try changing the nullify delete rule to no action ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With