Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Commit object with ID
Commit object with ID [message #1032555] Wed, 03 April 2013 06:22 Go to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi,

I've got an Eclipse RCP that commits changes to the database after an object has been edited. So when a user wishes to delete an object it gets deleted from the database immediately. If the user now uses the redo function, the object is restored and will be saved. Well that is the problem: This object already has an ID, so EclipseLink throws an OptimisticLockException and says "the object cannot be merged because it has changed or been deleted since it was last read".
Is there an option to force Eclipselink to ignore the ID? Since I'm using Texo to persist the objects, I cannot influence EclipseLink to use persist or merge.

Best regards
Bastian
Re: Commit object with ID [message #1033411 is a reply to message #1032555] Thu, 04 April 2013 07:57 Go to previous message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi,

Just removing the version manually works fine. So it was just a false understanding.

Bastian
Previous Topic:JPA/DCN - working for INSERT; trouble with UPDATE
Next Topic:Unable to read a db table
Goto Forum:
  


Current Time: Tue Sep 30 11:51:12 GMT 2014

Powered by FUDForum. Page generated in 0.04702 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software