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
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):
xcdatamodel
NSManagedObject