• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newly inserted objects not retrieved with executeFetchRequest...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Newly inserted objects not retrieved with executeFetchRequest... (From: Eric MORAND <email@hidden>)

  • Prev by Date: Re: NSObjectController observations fail
  • Next by Date: Re: Open Recent Menu
  • Previous by thread: Re: Newly inserted objects not retrieved with executeFetchRequest...
  • Next by thread: Overlay over webView
  • Index(es):
    • Date
    • Thread