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
Post a Comment