Re: CoreData "Could Not Merge Changes"
Re: CoreData "Could Not Merge Changes"
- Subject: Re: CoreData "Could Not Merge Changes"
- From: Jim Correia <email@hidden>
- Date: Sat, 13 Aug 2005 14:20:39 -0400
On Aug 13, 2005, at 11:03 AM, Jesse Grosjean wrote:
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.
I wouldn't expect this error with a single MOC.
I can reproduce the problem here (but haven't tried it in a trivial
sample). Looking at the information in the error it isn't immediately
obvious to me why it is failing.
You should probably write a bug with a sample app.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden