• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to update a column to null by using hibernate update statement.  RSS feed

 
somu somu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am very new to Hibernate,

I want to update a column in DB to null using hibernate update query, instead of load all the object and saving it again.

My query is:-
update Patientadmission pa set pa.to_time=? where pa.admissionid=?, by sending null value directly to to_time column, it is giving error.

can you please help me, Faster respose can be appreciated.

Thanks & Regards
somu.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"somu somu " welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!