awakeFromInsert called twice with nested contexts
awakeFromInsert called twice with nested contexts
- Subject: awakeFromInsert called twice with nested contexts
- From: Tom Harrington <email@hidden>
- Date: Wed, 16 Nov 2011 18:16:44 -0700
I'm finding that if I use nested managed object contexts,
awakeFromInsert will be called twice on new objects.
The first call to -awakeFromInsert happens when I actually create a
managed object and insert it into the child context. On this call, if
I break in awakeFromInsert, self's managed object context is the child
context. The second call happens when I tell the child context to
save-- but this time, at the awakeFromInsert breakpoint, self's MOC is
the parent context. I've verified that it's the same object by
checking the object ID.
Since awakeFromNib is documented to be called only once in the
object's lifetime, I'm wondering if this is a Core Data bug or a
documentation bug. Has anyone else seen this?
--
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