开发者

Do auto generated core data accessors automatically delete objects?

Say you've got entity A, and it has a to-many relationship with entity B. If i use the auto-generated 开发者_Python百科accessor [entityA removeEntityBObject:entityB];, is entityB deleted or simply removed from entityA?

If it doesn't auto delete, is there a way to make it do so?


In your core data model, there's a field call "Delete Rule" for relationship.

You can choose Cascade, Nullify, Deny and No Action. Check the documentation for detail of what each of them do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜