开发者

Core Data: does delete an entity remove all relationships of other entities to it?

Say if I have two entities: MySubscription and AllSubscription, MySubscription has a one to one relationship to AllSubscription, thus AllSubscription has a inverse relationship to MySubscription, say:

MySub     AllSubs
a   <--->   A
            B
c   <--->   C
            D
e   <--->   E

if I delete a, does Core Data automatically开发者_如何学Python set A.mysub to nil?


All depends on your choice of delete rule, which can be specified for each relationship. The rule you are describing is called "nullify".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜