aspose file tools
The moose likes Object Relational Mapping and the fly likes How to update a column to null by using hibernate update statement. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "How to update a column to null by using hibernate update statement." Watch "How to update a column to null by using hibernate update statement." New topic
Author

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

somu somu
Greenhorn

Joined: Jun 29, 2009
Posts: 1
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

Joined: Jun 06, 2007
Posts: 2196

"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.


Tell Difficulties that I am DIFFICULT
Asking Good Questions
 
 
subject: How to update a column to null by using hibernate update statement.
 
Threads others viewed
Retriving data from two tables where there is no physical relation ship in hibernate
Hibernate Inheritance..
Index column is null
Hibernate: Default Binding of database field
How to update multiple columns in Hibernate(using HQL query)?
IntelliJ Java IDE