Re: awakeFromInsert called twice with nested contexts
Re: awakeFromInsert called twice with nested contexts
- Subject: Re: awakeFromInsert called twice with nested contexts
- From: Tom Harrington <email@hidden>
- Date: Sun, 27 Nov 2011 21:50:08 -0700
On Sun, Nov 27, 2011 at 6:09 PM, Quincey Morris
<email@hidden> wrote:
> 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.
If they're different objects then I'm getting duplicates, which is at
least as much of a bug and possibly more so. What I observe is that if
I add 10 objects, I get 20 calls to awakeFromInsert, 10 for the child
context and 10 for the parent. But, there are only 10 unique managed
object IDs. It might be that I just happen to be getting the same IDs
for two completely different sets of objects, but there shouldn't be
two sets in the first place.
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
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