FROM : Ralph Manns
DATE : Tue Feb 19 23:45:47 2008
Core Data newbie question:
I have one entity "Category" with a property "categoryName" , a one-to-
many relationship "children" and an inverse one-to-one relationship
"parent".
My question: how do I add an object and set the relationship. In
Apple's department-employee example is this done with:
NSMutableSet *employees;
employees = [department mutableSetValueForKey: @"employees"];
[employees addObject: newEmployee];
But there are two entities. How do I add a new employee and set the
manager or directReports relationship in Apple's example?
Can someone give me a hint. Thanks.
Ralph.
DATE : Tue Feb 19 23:45:47 2008
Core Data newbie question:
I have one entity "Category" with a property "categoryName" , a one-to-
many relationship "children" and an inverse one-to-one relationship
"parent".
My question: how do I add an object and set the relationship. In
Apple's department-employee example is this done with:
NSMutableSet *employees;
employees = [department mutableSetValueForKey: @"employees"];
[employees addObject: newEmployee];
But there are two entities. How do I add a new employee and set the
manager or directReports relationship in Apple's example?
Can someone give me a hint. Thanks.
Ralph.
| Related mails | Author | Date |
|---|---|---|
| Ralph Manns | Feb 19, 23:45 | |
| I. Savant | Feb 19, 23:52 | |
| Ralph Manns | Feb 20, 00:58 | |
| I. Savant | Feb 20, 01:03 |






Cocoa mail archive

