At 10:44 AM -0700 5/12/08, [EMAIL PROTECTED] 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to