Re: Newly inserted objects not retrieved with executeFetchRequest...
Re: Newly inserted objects not retrieved with executeFetchRequest...
- Subject: Re: Newly inserted objects not retrieved with executeFetchRequest...
- From: mmalc crawford <email@hidden>
- Date: Tue, 14 Aug 2007 06:07:21 -0700
On Aug 14, 2007, at 3:50 AM, Eric MORAND wrote:
selectedBrand = [[[Brand alloc] initWithEntity:[NSEntityDescription
entityForName:@"Brand" inManagedObjectContext:managedObjectContext]
insertIntoManagedObjectContext:managedObjectContext] autorelease];
It's usually easier to write:
NSManagedObject *newBrand = [NSEntityDescription
insertNewObjectForEntityForName:@"Brand"
inManagedObjectContext:managedObjectContext];
See <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html
>.
I was not creating the entity description used by the fetch request
properly :
For more on fetching, see: <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFetching.html
>.
mmalc
_______________________________________________
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