I have a table in which there are 14 columns. Now I have a object corresponds to the table in which I have only 5 values to be updated.
I am using saveOrUpdate method to either save/update the row. The issue is that when I use this method to update those 5 columns, all other 9 column values are set to null.
One solution is that I write update sql query to do the same but I want to use Hibernate API’s not sql queries.
Is there any way to achieve that?
I have a table in which there are 14 columns. Now I have a
Share
No need to call
saveOrUpdate()ormerge(): the object is attached, so everything is flushed and committed at the end of the transaction.