These are chat archives for hibernate/hibernate-orm

7th
Jun 2016
zyro
@zyro23
Jun 07 2016 07:32
can a StaleObjectStateException / OptimisticLockingException still occur on tx commit if i explicitly flushed the session before commit (and no exception was raised)?
ryan2049
@ryan2049
Jun 07 2016 10:58
Yes
zyro
@zyro23
Jun 07 2016 12:03
@ryan2049 what i suspected.. because the tx commit may flush again hitting an optimistic locking conflict?
ryan2049
@ryan2049
Jun 07 2016 12:25
A flush only commits changes to the hibernate session, when you commit the transaction you're actually trying to issue DML statements to the database
Something else could have updated the database since then
Make sense?