This exception comes when ever any of your objects property have some invalid value i.e value that is not according to provided mapping of that object. e.g while handling optimistic concurrency if you didnt add Unsaved-value="-1" in your versin property i.e



then it leads to hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
because the requirment of version field is "-1" when in default state.

0 comments