Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 7, 2012, 03:19 PM   #1
ramy1989
macrumors newbie
 
Join Date: Nov 2012
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.
ramy1989 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:29 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC