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?
A:
Need more clues.
how are you creating the employee object?
how are you fetching the department object?
how are you updating the relationship?
are you saving the context?
are you checking for errors?
bbum
2010-06-13 20:55:53