开发者

CoreData: inverse relationship no set automatically

I've got a very strange situation: in one app I have lots of CoreData entities. Few pairs of them are connected by one-to-one relationships with inver开发者_C百科se relationships. They are kind of parent-to-child relationships: so when parent is created I create child in it's awakeFromInsert. The problem is that in one of such relationships inverse parent.child is nil. And of course I've got error when trying to save managedObjectContext. Of course I can set this inverse relationship manually, but I wonder why it's not set automatically?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜