In iOS 9
, I can specify certain attributes in an entity to be unique constraints
to prevent managed objects with the same unique constraints to be created.
Each NSManagedObject
has its own ObjectId
but maintained internally by Core Data
and cannot be set as unique constraint in the model.
Based on that notion, does it make sense to include a "primary key
" attribute for all entities in core data and specify the primary key as unique constraint if I don't want duplicate data?