java - Hibernate update with same column -


sql statement:

update table set column = 'new_value' column = 'old_value' 

(same column name)

how in hibernate?

you may use entitymanager.merge() can lead nonuniqueobjectexception if there multiple results found same column name.

better use namedquery ot nativenamedquery achieve this.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -