openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger" <>
Subject RE: update always called on commits (still)
Date Wed, 07 May 2008 17:30:49 GMT
I'm sure it's not that simple, but you aren't maybe by chance not using
enhancement (build or that -javaagent) and relying on the OpenJPA
feature that allows to run even unenhanced in some kind of degraded mode
(there is a log at the beginning if you're in that mode), and we noticed
that "change tracking" seems very unreliable in that mode, and you
easily get unncessarry SQL UPDATE statements.  Note also the

If you're sure you're enhancing (correctly; not e.g. having Eclipse
overwrite your .class), this is surely something else; sorry.

-----Original Message-----
From: Tedman Leung [] 
Sent: mercredi, 7. mai 2008 19:12
Subject: update always called on commits (still)

Hi  while back we had a discussion on updates (or more specifically
preupdates) always being called even when no changes where made.

I noticed there was an issue OPENJPA-506 openned for this and currently
closed - but this still occurs.

Both anotated @PreUpdate methods as well as updates are always called
even on read only operations.

Does anyone know if this is considered an open issue or a fixed issue?

I'm running OpenJPA 1.1 checkout from SVN on April 28th, 2008 which is
long after the fixed date of Feb 1 2008.

This is now causing me even worst problems due to a recent change in my
application where I switched from using @PreUpdate to @Version to keep
track of the last updated time of an object. Previously the lastUpdated
field was useless because it was just the last time some one read the
object, now it's throwing OptimisticLockException because requests are
thinking some one else updated the object (when in reality it was just

                                                           Ted Leung

You know you're in trouble when snow starts to clog your ram jets.


 This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
 Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
 Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
 An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
 If you have received this email in error, please notify the sender immediately
  and delete the original.

View raw message