0 CoreData 0x19869d080 -[NSManagedObjectContext _thereIsNoSadnessLikeTheDeathOfOptimism].cold.1 + 28
1 CoreData 0x1984eef0c -[NSManagedObjectContext _generateOptLockExceptionForConstraintFailure:] + 22
2 CoreData 0x1983b97b4 -[NSManagedObjectContext save:] + 1992
Running into this error for a small percentage of users after including a new column to a uniqueness constraint on a table in CoreData. The merge policy is set to NSMergeByPropertyObjectTrumpMergePolicy for the context in which the object is being saved.
My expectation is that there should be no exception since a merge policy is specified. I am digging through CoreData documentation to try and make sense of this error message, but I cannot find any information for what _generateOptLockExceptionForConstraintFailure means.