Re: awakeFromInsert called twice with nested contexts
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