Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ramy1989

macrumors newbie
Original poster
Nov 7, 2012
21
0
Here's question that I'm trying to solve from time, I even offered a stack overflow bounty but no-one got the problem:

I have an entity named Person that may have one home, and an entity named Home that may have one to N homes:

XB9Th.png


Then I have two array controllers:

Homes Controller, bound with managed object context, in entity mode: Home;
People Controller, bound with managed object context, in entity mode: person.
I have a cell based table view, bound with the People Controller.I am able to display successfully the first three columns (name, surname and age), but the problem is with the 4th column: the home's name.Inside the column there is a popup button cell, these are the bindings:

Content: Homes Controller.arrangedObjects ;
Content values: Homes Controller.arrangedObjects.name;
Selected object: People Controller.home.
The problem comes at runtime, when I try to click to the popup button to choose the home:

WspRi.png


Like you see instead of the choice I see "Core data relationship fault", and if I try to change the home by clicking on the menu items, I see a lot of code printed to the console, I post only the most significant line:

2012-11-04 01:47:45.181 Test[4390:303] [<NSManagedObject 0x100156e60> valueForUndefinedKey:]: the entity Home is not key value coding-compliant for the key "(null)".

And after this the application freezes.

PS: The relationship home and people are the inverse of each other.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.