Hibernate executeupdate not updating

In development environments, this is often due to a developer transaction in SQL Developer.

Use the Oracle tools to see what lock your update is waiting for an who is holding the lock.

In particular, a stateless session does not implement a first-level cache nor interact with any second-level or query cache.

hibernate executeupdate not updating-57hibernate executeupdate not updating-15hibernate executeupdate not updating-21

Fine, it all worked, but in terms of Date date Lock Expires = new Date(System.current Time Millis() – lock Threshold In Ms); String hql = "update " Abstract Page.Name() " p " " set locked By=:user, locked Since=:lock Date" " where (" " locked By is null" " or locked Since is null" " or locked By = :user" " or locked Since statements are being sent to the database, and this all happens within the same transaction, the second select retrieves stale data, as if the previous execute Update() had never happened :( One possible reason why is because we are using a version column, and the execute Update is not updating it.

To make sure I'm not crazy, I ran the statement in SQL Developer to make sure it works properly.

Here is part of my DAO code: You may have an uncommitted transaction that is holding a lock that this transaction requires.

I am facing following issue with version(Optimistic lock).

the version check is not happening and exception stale state Exception not thrown when i use below query.

Leave a Reply