• 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: NSManagedObjected isInserted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSManagedObjected isInserted


  • Subject: Re: NSManagedObjected isInserted
  • From: "Carter R. Harrison" <email@hidden>
  • Date: Sun, 10 Apr 2011 14:52:08 -0400

On Apr 10, 2011, at 1:29 PM, Quincey Morris wrote:

> On Apr 10, 2011, at 06:52, Carter R. Harrison wrote:
>
>> Can anybody ever think of a scenario where [NSManagedObject isInserted] equals NO for an object that is initially fetched from the context?  And no the object has not been deleted from the context prior to calling isInserted.
>
> What do you mean by "initially fetched"? The object should return YES for "isInserted" from the time it's inserted to the time the store is committed/saved. It's not clear where in this timeline your "initially" is pointing.
>

I'm creating and NSManagedObject with [NSManagedObject initWithEntity:insertIntoManagedObjectContext:] and for the context I'm passing nil.  Later I call [NSManagedObjectContext insertObject:] and pass in the same NSManagedObject that was initialized earlier.

On a subsequent run of my application I fetch the object from the store and call [NSManagedObject isInserted].  Without fail it always returns NO.



_______________________________________________

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

  • Follow-Ups:
    • Re: NSManagedObjected isInserted
      • From: Mike Abdullah <email@hidden>
    • Re: NSManagedObjected isInserted
      • From: Jerry Krinock <email@hidden>
References: 
 >NSManagedObjected isInserted (From: "Carter R. Harrison" <email@hidden>)
 >Re: NSManagedObjected isInserted (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Mac App Store requirements
  • Next by Date: Re: Mac App Store requirements
  • Previous by thread: Re: NSManagedObjected isInserted
  • Next by thread: Re: NSManagedObjected isInserted
  • Index(es):
    • Date
    • Thread