Core Data-Linking one-to-many relationships

Posted by Stelmate on Stack Overflow See other posts from Stack Overflow or by Stelmate
Published on 2010-06-13T20:47:09Z Indexed on 2010/06/13 20:52 UTC
Read the original article Hit count: 164

Filed under:
|
|
|

I have a one-to-many relationship where each department has many employees. When I create a new employee object I just link it to the parent department manually by setting the property to the instance of the department I have fetched from my fetch request. However, this seems to be improper because when I try to access the set of employees from the department by simply accessing the .employees property on my department object instance it returns a 0 count. Isn't the fault suppose to fire once I access a property? Am I linking my parent/child objects incorrectly?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c