Core Data Primary Key

前端 未结 7 762
無奈伤痛
無奈伤痛 2020-11-28 02:37

This may seem stupid, but I still couldn\'t figure out how to mark a attribute as a primary key in the xcdatamodel file. My persistent storage is sqlite file. Can anyone hel

7条回答
  •  庸人自扰
    2020-11-28 03:10

    Without hacking NSManagedObjectID you can perform a fast check for your attribute before manage your remote data collection.

    I've made an utility method, check it here

提交回复
热议问题