Jeremy Stein - Brain

« »

Row was updated or deleted by another transaction

org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)

I got this message when I was simply creating a new object. The problem was that my version column was not recognized as being new. I had to either change it from long to java.lang.Long (so that it would be null when new), or add unsaved-value=”negative” to the mapping declaration and initialize the value to -1.

November 8, 2006 No Comments.

No Comments

Be the first to comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?

« »