Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: CoreData and "conflictList" error during save



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.