Comparing two NSManagedObjects

后端 未结 3 1452
眼角桃花
眼角桃花 2021-02-07 02:02

I have some code that loops through an array of NSManagedObjects and stops when it finds a certain record that is stored in an instance variable. The only way I can manage to se

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-07 03:03

    -isEqual: has been implemented correctly for NSManagedObjectID in CoreData. We use collections with -contains: all the time. It seems that the original poster confused -isEqual: with -isEqualTo: The latter should not be used.

提交回复
热议问题