Core Data: Keypath Error Not Found in Entity

后端 未结 4 1082
陌清茗
陌清茗 2021-02-19 02:05

Could any one tell me what\'s the wrong with this code? It raises the following error and cause application to crash:

reason: \'keypath Studies.patients.Patient         


        
4条回答
  •  天涯浪人
    2021-02-19 02:30

    In my case, I was referencing a superclass property of the entity but hadn't set the parent entity in the xcdatamodel file. I had to select the other NSManagedObject which I was subclassing from the inspector menu (default is None):

提交回复
热议问题