I would like to update column value with a new entity value incrementally, for example:
support I have a table USER with COLUMN name BALANCE
for specific user, his balance is 3000.
Now, I would like to set his value to 3500.
I have hibernate "User" Entity that has a 'balance' value of 500.
How can I make the update??
If I would like to make it using pure sql query, I would simple do:
"UPDATE USER set balance = balance+500 where user_id=3"
I would like to avoid calling sql and use hibernate.