-->
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: Mass Update?
PostPosted: Wed Oct 19, 2005 10:55 am 
Newbie

Joined: Wed Oct 19, 2005 10:47 am
Posts: 4
I need to change the status of all Employees that meet certain criteria. This is an administrative function, and I don't need to fetch the Employee objects. Is there a way to do this in Hibernate 2.1 without getting a Collection, iterating through them and changing the status?

In this case, I would think a straight JDBC update statement would be more efficient.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 11:06 am 
Beginner
Beginner

Joined: Tue Sep 23, 2003 10:03 am
Posts: 26
Location: madison, wi
I think straight JDBC would be preferrable in that situation.


Top
 Profile  
 
 Post subject: Re: Mass Update?
PostPosted: Wed Oct 19, 2005 11:11 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
pedromatic wrote:
I need to change the status of all Employees that meet certain criteria. This is an administrative function, and I don't need to fetch the Employee objects. Is there a way to do this in Hibernate 2.1 without getting a Collection, iterating through them and changing the status?

In this case, I would think a straight JDBC update statement would be more efficient.

Thanks.


Not in 2.1 using HQL.

According to the Hibernate site, Batch processing is/was the empasis for v3.1 and this style of updates is provided for in the 3.1 code-base. See section 14.4 of the Reference Documentation.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 1:29 pm 
Newbie

Joined: Wed Oct 19, 2005 10:47 am
Posts: 4
Thank you,
Migration to Hibernate 3 will resolve the issue. In the meantime, I'll just do a straight JDBC update.


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.