Just for the interested: After some more research I found that setting the version manually (which is not recommended by Hibernate) didn't work because of what is described here: https://forum.hibernate.org/viewtopic.php?p=2293177&sid=2969aa867c7086b4a3c7a68bda853690#p2293177
It's a really old post, but the solution he provides in that thread seems to work and feels like the most clean solution to me. Also I cannot find alot about this topic, and especially no real response from the Hibernate team themself. So what I have now: 1) Hidden field for the entities version 2) implementation of FlushEntityEventListener with onFlushDirty() method containing a check on the version which throws a StaleObjectStateException when needed -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-optimistic-locking-tp5718413p5718501.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org