Merging changes across NSManagedObjectContexts
Merging changes across NSManagedObjectContexts
- Subject: Merging changes across NSManagedObjectContexts
- From: Rick Mann <email@hidden>
- Date: Wed, 30 Dec 2009 12:54:49 -0800
In my app I have a situation where I have two (Core Data) documents open, and I need to merge all the changes made in one doc1 to the changes in doc2. I've been reading the section on Change Management in the Core Data Programming Guide, but it just talks about the caveats and gotchas, and doesn't actually talk about how to effect the merge. It also only talks about the example where the two MOCs share a single file, which is not the case here.
Where is merging itself documented? The MOC reference only talks about a merge notification. I need to do something like:
mergeMOC: doc1.managedObjectContext into: doc2.managedObjectContext;
Note that I'm not worried about all the issues that can arise for completely general merges. Doc2 will not have changes that conflict with doc1 (doc1 contains all-new data).
TIA,
Rick_______________________________________________
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