NSMutableArray stored with core data = WORKS, but after changing array DOESN'T WORK

后端 未结 1 684
陌清茗
陌清茗 2020-12-31 21:40

I have a NSManagedObject with a NSMutableArray as attribute:

@interface MyObject :  NSManagedObject  
{
}

@property (nonatomic, retain) id a1;
相关标签:
1条回答
  • 2020-12-31 22:23

    Changes inside of your Array are not going to work because Core Data cannot see into the array.

    The short answer is don't do this. This is no reason ever to store an array (or dictionary for that matter) in Core Data.

    Create a new entity in Core Data and create a relationship. If the order is important, put an order attribute in the child table.

    Do not store arrays as binary objects.

    0 讨论(0)
提交回复
热议问题