re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-17 Thread Ben Trumbull
Using the example from the guides, when I create a new employee with Employee *newEmployee = [NSEntityDescription insertNewObjectForEntityForName:*@"employee"* inManagedObjectContext:* context];* I not only get a new employee, but also a new unnamed department. When I add the employee to the

Re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Jerry Krinock
On 2009 May 13, at 15:26, Kent Hauser wrote: My actual problem is that when I create a new taskRecord (in a tableView delegate helper method I call 'getMutableTaskRecord'), the new taskRecord entity is created and added to the student's to-many taskRecords. The inverse in the new taskRecor

Re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Kent Hauser
Jerry, Sorry I wasn't clearer. My example of employee & department was in reference to the inverse-relationship example in the Core Data Programming guide. My actual application involves adding taskRecords to a student object, and I was just using the department-employee as an example of a to-many

Re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Jerry Krinock
Well, I don't know what you're doing wrong. Actually I'm not sure what is the undesired behavior your are seeing. But let me explain something... That department creation you are referring to in the DepartmentAndEmployees sample occurs within the document's - initWithType:error: implem