Row was updated or deleted by another transaction |
While working with hibernate (which is quite popular java object relational mapper), you might have stumbled upon this exception: Row was updated or deleted by another transaction
What does this exception really mean? Well, you're most probably trying to update an object via hibernate which was version ID is lower than version ID of object in the database. Hope this will help some java newbies which are using hibernate for persistence. What is the solution to "row was updated or deleted by another transaction" then?
SolutionYou need to get the very latest version of object to avoid "row was updated ... " exception before you make any changes. This can be usually accomplished by adding: MyEntity myEntity = persistenceManager.findObjectById(myEntity .getId()) .. here goes then: persistenceManager.update(myEntity); on your hibernate persistence manager
|
Feature sl ... ($50-$100)
VueJS proj ... ($250-$500)
Content Da ... ($500-$1000)
Android ap ... ($300-$500)
Image reco ... ($100-$200)