|Nov 7, 2012, 03:19 PM||#1|
Core data relationship fault : null key
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:
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:
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.
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 08:27 AM.