Creating a unique id for a Core Data program on the iPhone

前端 未结 9 1550
暖寄归人
暖寄归人 2020-12-04 07:28

I am having a bit of trouble figuring out this Core Data stuff. How do I create a new entry with a unique ID? In SQL I would just declare one field as an autoincrement fie

9条回答
  •  一向
    一向 (楼主)
    2020-12-04 08:01

    i think this will be usefull in such conditions.

    http://lists.apple.com/archives/cocoa-dev/2006/Jul/msg01801.html We can get maxExistingID . SO we can increment that when saving a new item

提交回复
热议问题