-->
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: why not hibernate have delete/update criteria
PostPosted: Wed May 31, 2006 9:55 am 
Newbie

Joined: Wed May 31, 2006 9:48 am
Posts: 2
At first,i think Hibernate Criteria is the Object-oriented of sql norms,but later discovered that Hibernate only implement the retrieve function but not to the delete and update.
Although Hibernate itself have one object delete and update method, but sometimes also need batch operation, of course, we can used HQL, when conditions are diversified, using the criteria in this way(criteria way) would be better.
So why not hibernate have delete/update criteria.
Any suggestion or solution?


Last edited by sdhjc on Wed May 31, 2006 10:26 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 10:11 am 
Senior
Senior

Joined: Mon Apr 04, 2005 8:04 am
Posts: 128
Location: Manchester, NH USA
You can easily do batch update/delete with HQL.

http://www.hibernate.org/hib_docs/v3/reference/en/html/batch.html#batch-direct


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 10:30 am 
Newbie

Joined: Wed May 31, 2006 9:48 am
Posts: 2
yes,i can use HQL.But if the condition in the where clause is very complex and changeful,use the criteria way to update and delete is better.


Top
 Profile  
 
 Post subject: Re: why not hibernate have delete/update criteria
PostPosted: Wed Sep 23, 2009 10:27 am 
Newbie

Joined: Fri Aug 24, 2007 10:11 am
Posts: 5
I'm also very interested for delete by criteria and think it will be very usefull.

Is it still not possible?


Top
 Profile  
 
 Post subject: Re: why not hibernate have delete/update criteria
PostPosted: Wed Sep 23, 2009 12:35 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Not yet!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.