Will an Eclipse project be fine for the OpenJPA developers? How about the lib
jars? Will m2eclipse and maven be acceptable (certainly would be easiest)?
Marc - are you using Spring Framework transaction management?
regards
Adam
Marc Siegel on 18/12/07 14:44, wrote:
It would be worth it to some of us users. Anything that could be done
to get this fixed would help many people.
-Marc
On Dec 17, 2007 6:34 PM, Adam Hardy <[EMAIL PROTECTED]> wrote:
I also had a situation where OpenJPA fired updates on unchanged entities after
committing the transaction, for all fields all the time.
For instance, one pojo only had 2 string fields and a Long primary key. OpenJPA
updated both string fields after the commit.
I'm using the extended persistence context without any versioning, and the only
configuration I set is the JDBC connection properties.
Unfortunately I fixed it without figuring out where exactly the problem was.
Sorry. I think what I had done is to begin a transaction, commit it, and then
start another and whatever I pulled into the second transaction, OpenJPA did an
update on.
If you think this is worth putting a test case together for, let me know. I
wasn't quite sure whether running a second transaction after the first on the
same entity manager was legitimate according to the JPA spec.
Shelley <[EMAIL PROTECTED]> writes:
I am seeing a similar issue with OpenJPA unnecessarily calling an UPDATE on
every commit.
It appears that on every commit(), all of my entity's Date fields
(TemporalType.TIMESTAMP) are being updated even though they have not
changed.
UPDATE MY_ENTITY SET timeField = ?, version = ? WHERE id = ? AND version = ?
[params=(Timestamp) 2007-12-05 15:08:18.927, (int) 2, (int) 50, (int) 1]
My current workaround is to clear the persistence context after each commit,
but this obviously is not desirable and shouldn't be necessary. Any ideas
as to why this might be occurring, or how to prevent it? I am using the
majority of default OpenJPA properties (version LockManager, optimistic
locking, etc), although I have attempted to modify some of these properties
to prevent this problem, so far with no success.