On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote:

-(IBAction)newJob:(id)sender
{
        id folder = [self currentFolder];
CCCEJob *newJob = [NSEntityDescription insertNewObjectForEntityForName:@"CCCEJob" inManagedObjectContext: [self managedObjectContext]];
        [folder addJobsObject:newJob];
        newJob.rootFolder = [newJob getRootFolder];
}

Perhaps I was wrong about the inverse relationship getting set KVO- compliantly. Instead of:

        newJob.rootFolder = [newJob getRootFolder];

you could try:

        [[newJob getRootFolder] addAllDescendantsJobsObject: newJob];

(after adding @dynamic addAllDescendantsJobsObject or whatever), or, equivalently:

[[[newJob getRootFolder] mutableSetValueForKey: @"allDescendantsJobs"] addObject: newJob];

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to