Mailing Lists: Apple Mailing Lists

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

CoreData "Could Not Merge Changes"



I'm getting a "Could not merge changes" error, the documentation says that this error is caused when two different managed object contexts try to change the same data. But in my case I only have a single managed object context. I can recreate the error this way:

1. save a new managed object context.
2. Insert a new object into the managed object context.
3. change attribute of that object.
4. save managed object context.
5. undo twice, so that the attribute is unset and the object is removed from the managed object context.
6. save managed object context.
7. redo once
8. try to save the managed object context.


At this point I get the "Could not merge changes" error in my application. I also get errors (though different ones) if I try this same test sequence in the the CoreData EventManger example. I can get rid of the problem by setting a merge policy, but I wasn't expecting to have to do this since I'm only using a single managed object context.

Can someone let me know if the above is expected behavior, and what the recommended solution is. I'm happy to set a merge policy if that's what I need to do.

Thanks,
Jesse
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
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.