Re: Creating temporary NSManagedObjects (PS)
Re: Creating temporary NSManagedObjects (PS)
- Subject: Re: Creating temporary NSManagedObjects (PS)
- From: vincent habchi <email@hidden>
- Date: Mon, 26 Apr 2010 11:36:09 +0200
Le 26 avr. 2010 à 11:04, Jack Nutting a écrit :
> // assuming your app delegate contains the "managedObjectModel" method, which
> // the standard Xcode-generated CoreData app typically does
> NSManagedObjectModel *managedObjectModel = [[NSApplication delegate]
> managedObjectModel];
> NSEntityDescription *entity = [[managedObjectModel entitiesByName] @"MyEntity"];
> id obj = [[NSManagedObject alloc] initWithEntity:entity
> insertIntoManagedObjectContext:nil];
By the way, how do you delete these objects with a null MOC, since you are supposed to call [MOC deleteObject:]?
Vincent_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden