re: CoreData and "conflictList" error during save
re: CoreData and "conflictList" error during save
- Subject: re: CoreData and "conflictList" error during save
- From: Ben Trumbull <email@hidden>
- Date: Tue, 13 May 2008 12:40:05 -0700
At 10:44 AM -0700 5/12/08, email@hidden wrote:
Hello,
I'm using core-data in a program of mine. It uses two context where
one of these is used in a second thread to perform saving operation.
Sometimes at the end of all operations when I perform a save operation
on my main context I receive a
"conflictList" error.
Is there any way to avoid it by merging changes?
I've tried with
[[self managedObjectContext] processPendingChanges];
[[self managedObjectContext] commitEditing];
-commitEditing is for controllers bound to this
NSManagedObjectContext. It doesn't do anything from Core Data's
perspective, it just passes the message along.
You should check out the merge policies in the Core Data Reference
Guide, and the Core Data Programming Guide. The default policy is
"error out" so you actually have to think about what you want done.
<http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Merge_Policies>
--
-Ben
_______________________________________________
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