-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How to update a column using hibernate
PostPosted: Tue Jan 24, 2006 5:49 am 
Newbie

Joined: Tue Jan 24, 2006 5:45 am
Posts: 3
hi iam using oracle data base..
i want to update a column....
do in need to use session.saveorupdate("..")
or session.createquery("...")


Top
 Profile  
 
 Post subject: options
PostPosted: Tue Jan 24, 2006 2:10 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
I assume that you are interested in bulk operations

With HQL: http://www.hibernate.org/hib_docs/v3/re ... tch-direct

and you can always get DB connection with session.connection() and perform necessary updates with plain JDBC

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject: Re: How to update a column using hibernate
PostPosted: Tue Jan 24, 2006 2:43 pm 
Newbie

Joined: Mon Jan 09, 2006 3:57 pm
Posts: 4
niki wrote:
hi iam using oracle data base..
i want to update a column....
do in need to use session.saveorupdate("..")
or session.createquery("...")

You can do it either ways.,
if you have a domain object, hibernate will try to save all properties into the database (You might need a fetch and populate from your dto for getting updated values), meaning it will try to update a lot of columsn..
if your dto is carrying only changed values, or there are audit trails or triggers associated with changes, you might want to use query object!!!

:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.