How to add 'Constraint' support #158

Open
opened 2025-12-29 15:25:56 +01:00 by adam · 1 comment
Owner

Originally created by @asadali737 on GitHub (Aug 11, 2017).

I have a entity with unique constraint in it. While saving the record it's giving me error. How can I configure ManagedObjectContext to make this happen?

I am talking about NSMergeByPropertyObjectTrumpMergePolicy

For reference please check out this link

Originally created by @asadali737 on GitHub (Aug 11, 2017). I have a entity with unique constraint in it. While saving the record it's giving me error. How can I configure ManagedObjectContext to make this happen? I am talking about `NSMergeByPropertyObjectTrumpMergePolicy ` For reference please check out [this link](http://dorianroy.com/blog/2015/09/how-to-implement-unique-constraints-in-core-data-with-ios-9/)
adam added the question label 2025-12-29 15:25:56 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Aug 12, 2017):

What error are you getting?

CoreStore already uses NSMergeByPropertyObjectTrumpMergePolicy (see 91fda01071/Sources/NSManagedObjectContext%2BSetup.swift (L68)),
so any errors you are getting now may be conflicts you'll need to handle.

@JohnEstropia commented on GitHub (Aug 12, 2017): What error are you getting? CoreStore already uses `NSMergeByPropertyObjectTrumpMergePolicy` (see https://github.com/JohnEstropia/CoreStore/blob/91fda01071ff9f4610b2e5d604d8f270e1167d75/Sources/NSManagedObjectContext%2BSetup.swift#L68), so any errors you are getting now may be conflicts you'll need to handle.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#158