-->
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.  [ 5 posts ] 
Author Message
 Post subject: Mass deleting...
PostPosted: Thu Mar 10, 2005 10:56 am 
Newbie

Joined: Thu Mar 10, 2005 10:41 am
Posts: 7
Hi all....

I am new to hibernate..

How to delete or update a group of records in one shot????

No relations exist between the tables i used.

Composite keys are present..

Now i am doing it one by one...(time consuming..)

...
...

Thanks and regards..

_________________
Jijo Vincent


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 12:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hibernate 3 has this ability. The test suite is always a good place to look.
See

http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/test/org/hibernate/test/hql/BulkManipulationTest.java?view=markup

For examples using Query.executeUpdate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 10:44 am 
Beginner
Beginner

Joined: Tue Feb 01, 2005 8:38 am
Posts: 38
david wrote:
Hibernate 3 has this ability. The test suite is always a good place to look.
See

http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/test/org/hibernate/test/hql/BulkManipulationTest.java?view=markup

For examples using Query.executeUpdate


I'm using Hibernate 3.0 and there is no Query.executeUpdate() in this release. The only methods I can call on a Query to execute it are Query.list(), Query.scroll() and Query.iterate(). All of these expect that there will be a set of results to return - what do you use if your query does not return anything (other than perhaps a number of records updated) as would be the case with an update or delete query?

Cheers,

John :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 5:03 am 
Beginner
Beginner

Joined: Wed Jan 21, 2004 10:15 am
Posts: 24
Location: Munich, Germany
Scorlóg wrote:
I'm using Hibernate 3.0 and there is no Query.executeUpdate() in this release.


It seems that it is misspelled as Query.executeUpate()... Maybe this should be changed before the release. ;-)

Christian


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 7:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Look at the link above - Its correctly spelt.


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