users@glassfish.java.net

Re: switch to hibernate: Row was updated or deleted by another transaction

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 Nov 2008 08:43:15 PST

cause of exception has been found:
the problem was that entity's version field(@Version) was stored in DB with type DATE(oracle db data type) and during update in query hibernate specifies version field with milliseconds (like it stores value in memory after creating entity) but database contains version field without millis - that's the reason of the exception mentioned above - update find's no records to update.

toplink seems not to be so strict and omit millis part somehow.
[Message sent by forum member 'olperv' (olperv)]

http://forums.java.net/jive/thread.jspa?messageID=315066