且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NSMutableArray存储核心数据= WORKS,但更改数组后不工作

更新时间:2022-05-30 04:40:19

您的数组内部的更改将无法工作,因为Core Data无法查看数组。

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

简短的回答是不要这样做。这是没有理由在Core Data中存储数组(或字典)。

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.

在Core Data中创建一个新实体并创建一个关系。如果顺序很重要,请在子表中放置order属性。

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.