wow! thanks!
i've downloaded the current version from cvs and run my little test again.
With "optimistic-lock='all'" the first thread is able to write to the database now, the second still isn't but the exception has changed to:
Code:
6953 [Thread-0] ERROR hibernate.test.DBAccessorThread_1 - unexpected exception occured. SQL insert, update or delete failed (row not found)
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:25)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:678)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:638)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2437)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2391)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259)
at hibernate.test.DBAccessorThread.run(DBAccessorThread.java:57)
(same effect by using "optimistic-lock='dirty'" or setting "select-before-update='true'".)
So something really has changed ...
The interessting point is, that all parameters are correctly bound to the prepared-statement now ... running the generated sql
Code:
update testtable set changeField=? where id=? and changeField=?
(added the parameters from log) by hand works fine, too ...
Now it seems, that there's still a problem ... but setting the parameters works fine ...
regard,
carsten