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
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 18:23:51 +01:00
@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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
NSMergeByPropertyObjectTrumpMergePolicyFor reference please check out this link
@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.