{"id":71,"date":"2006-11-08T16:57:08","date_gmt":"2006-11-08T21:57:08","guid":{"rendered":"http:\/\/stein.everybody.org\/brain\/row-was-updated-or-deleted-by-another-transaction\/"},"modified":"2011-03-10T10:57:30","modified_gmt":"2011-03-10T15:57:30","slug":"row-was-updated-or-deleted-by-another-transaction","status":"publish","type":"post","link":"https:\/\/jeremystein.com\/brain\/row-was-updated-or-deleted-by-another-transaction\/","title":{"rendered":"Row was updated or deleted by another transaction"},"content":{"rendered":"<p>org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)<\/p>\n<p>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=&#8221;negative&#8221; to the mapping declaration and initialize the value to -1.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}