database - How to overwrite table when hibernate says it is locked? -
For the purpose of my application where the authors write articles, As I have some problems with locking behavior (the version field is used for this in each table) I need to overwrite a filthy entry.
Did some "flag" or command lock to save DB?
Will this be the option to get data from DB again, if it is dirty and after saving again? As we have a new version now and locking is over, there should not be any problem in saving it.
Pseudo code (not tested):
if (article.isDirty ()) {Article.get (params.id)} article.bindData (params) Article.save ()
for domain classes refresh () < Take a look at the / em> method: Note that there are warnings, so the best part is to drag your latest version of the domain object and then merge the data into the program:
Comments
Post a Comment