Re: awakeFromInsert called twice with nested contexts
Re: awakeFromInsert called twice with nested contexts
- Subject: Re: awakeFromInsert called twice with nested contexts
- From: Kyle Sluder <email@hidden>
- Date: Sun, 27 Nov 2011 23:39:38 -0800
On Nov 27, 2011, at 9:23 PM, Quincey Morris <email@hidden> wrote:
> On Nov 27, 2011, at 20:50 , Tom Harrington wrote:
>
>> 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.
>
> Objects are specific to a managed object context, so it's correct that there would be 20 objects, and it's correct that there would be only 10 object IDs.
To clarify: if you had two nested MOCs that shared the same parent MOC, how would you plan on editing an object in Nested Context A as well as in Nested Context B if there *weren't* two separate NSManagedObject instances with the same object ID, each associated with a different context?
--Kyle Sluder_______________________________________________
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