-->
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: Deleting objects from v2+ to v3
PostPosted: Wed May 18, 2005 12:12 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
Deleting objects/rows in Hibernate 3.0.3 appears to be around Session.delete(Object object). It seems in the 2+ versions of Hibernate, there were more options. It appeared you could take a query (like a default query used for select) and pass it into a delete method and it will run the method as a SQL delete. But it appears that in Hibernate 3.0.3, the only way to delete an object is to first query for the object and then send that object through the Session.delete method...is this true?

Thanks,

jay


Top
 Profile  
 
 Post subject: Re: Deleting objects from v2+ to v3
PostPosted: Wed May 18, 2005 4:24 pm 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
jaybytez wrote:
Deleting objects/rows in Hibernate 3.0.3 appears to be around Session.delete(Object object). It seems in the 2+ versions of Hibernate, there were more options. It appeared you could take a query (like a default query used for select) and pass it into a delete method and it will run the method as a SQL delete. But it appears that in Hibernate 3.0.3, the only way to delete an object is to first query for the object and then send that object through the Session.delete method...is this true?

Thanks,

jay


Yes. It is true. In H2, they executed the query, retrieved the objects, and deleted them for you. Now you have to do it yourself.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 19, 2005 10:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
H3 has support for 'true' bulk delete while H2 emulated it by doing the select then individual deletes. Emulation has been removed.


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.