-->
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.  [ 4 posts ] 
Author Message
 Post subject: Updating more than one row
PostPosted: Tue Apr 20, 2010 11:05 pm 
Newbie

Joined: Thu Nov 06, 2008 3:42 am
Posts: 15
Hi,
I use session.update(Object) to update an Object.
But How can I update more than one row. For instance, in traditional SQL query we can update more than one row based on where conditions. Can we achieve this in Hibernate?

Thanks in advance & Kind Regards,
Sham.


Top
 Profile  
 
 Post subject: Re: Updating more than one row
PostPosted: Wed Apr 21, 2010 1:47 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Yes. http://docs.jboss.org/hibernate/stable/ ... tch-direct


Top
 Profile  
 
 Post subject: Re: Updating more than one row
PostPosted: Wed Apr 21, 2010 10:33 pm 
Newbie

Joined: Thu Nov 06, 2008 3:42 am
Posts: 15
Hi,
Thanks for the reply actually.
The link that I mentioned I tried it. My issue is slightly different.
In the same example the new name I want to update to several old names.
Is this possible?

Kind Regards, Sham.


Top
 Profile  
 
 Post subject: Re: Updating more than one row
PostPosted: Thu Apr 22, 2010 2:38 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
I don't understand your problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.