Core Data (After Adding Unique Constraint) : annotation: repairing missing delete propagation for to-many relationship

吃可爱长大的小学妹 提交于 2019-12-03 12:36:14

I hope I can help, having a unique constraint with To-Many Relationship Entities you need to keep some points in mind

  • Use Inverse Relationship of every CoreData relation
  • Unique Constrains Attributes should never be Optional

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 ?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!