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

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

php - trouble displaying mysqli database results in correct order -

javascript - Trying create a translator based on a preset alphabet -