Affects: spring-orm:5.1.9 release
sample exception thrown message:
org.springframework.orm.ObjectOptimisticLockingFailureException: Object of class [com.***.app.domain.Customer] with identifier [421969]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.***.app.domain.Customer#421969]; nested exception is org.springframework.orm.ObjectOptimisticLockingFailureException: Object of class [com.**.app.domain.Customer] with identifier [421969]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.***.app.domain.Customer#421969]
ISSUE Here is only Identifier is showing but not version at which it occured
Comment From: quaff
It's a hibernate issue, not here.
Comment From: sbrannen
Indeed, Spring's ObjectOptimisticLockingFailureException wraps the org.hibernate.StaleObjectStateException, but Hibernate's StaleObjectStateException does not track the version.
In light of that, I am closing this issue.