Lefora Free Forum
login join
Loading
640 views

nsmanagedobject child creates parent

Page 1
1–1
rookie - member
1 posts

Hi,

I can't figure out how to programmatically create a child object.

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 correct department, the new unnamed department remains as a bonus.

What am I doing wrong?

Thanks. Kent

Page 1
1–1

Locked Topic


You must be a member to post in this forum

Join Now!