• 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: awakeFromInsert called twice with nested contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awakeFromInsert called twice with nested contexts


  • Subject: Re: awakeFromInsert called twice with nested contexts
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 27 Nov 2011 17:09:20 -0800

On Nov 27, 2011, at 16:49 , Tom Harrington wrote:

> Actually I don't, so far as I can tell. As I mentioned in my previous
> message, I get the same managed object ID both times. I haven't
> checked the address, but surely if they were different objects they
> wouldn't have the same ID.

You're wrong about that. Different objects will of course have different pointers, but that's the most you can say.

The object, and hence the object pointer, is specific to a managed object context. The "object ID" is an attribute of the persistent store, and is independent of the MOC.

Core Data has no word for the object as it exists in the persistent store, except perhaps informally "row". The "object ID" is really a "row ID".

> The object appears the same both times-- a new object with no
> properties or relationships set.

That makes sense. 'awakeFromInsert:' allows you to populate object properties, not row properties.


_______________________________________________

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: awakeFromInsert called twice with nested contexts
      • From: Tom Harrington <email@hidden>
References: 
 >awakeFromInsert called twice with nested contexts (From: Tom Harrington <email@hidden>)
 >Re: awakeFromInsert called twice with nested contexts (From: Jerry Krinock <email@hidden>)
 >Re: awakeFromInsert called twice with nested contexts (From: Roland King <email@hidden>)
 >Re: awakeFromInsert called twice with nested contexts (From: Tom Harrington <email@hidden>)

  • Prev by Date: Re: awakeFromInsert called twice with nested contexts
  • Next by Date: Re: awakeFromInsert called twice with nested contexts
  • Previous by thread: Re: awakeFromInsert called twice with nested contexts
  • Next by thread: Re: awakeFromInsert called twice with nested contexts
  • Index(es):
    • Date
    • Thread