CoreData: “Dangling reference to an invalid object.” error

后端 未结 9 2101
余生分开走
余生分开走 2021-01-01 11:44

I\'m working on a Cocoa-Touch app, it uses CoreData and has some NSPersistentObject subclasses generated by the XCode model editor.

I\'ve noticed that recently, when

9条回答
  •  鱼传尺愫
    2021-01-01 12:42

    I know it's long after the fact, but I've been fighting this problem on a Core Data Model that has ALL relationships set to Nullify. Kept getting these dangling references until I found a single setPrimitiveValue instead of setValue when I was adding to the relationships. Be careful, with relationships, you gotta be sure you do the right thing to let Core Data maintain the relationships for you!

提交回复
热议问题