-->
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: Is lightweight delete possible?
PostPosted: Tue Aug 03, 2004 11:10 pm 
Newbie

Joined: Fri Jul 16, 2004 6:22 pm
Posts: 17
Is there a way to use hibernate to do a "quick delete"? The behavior I would like is to issue a delete query (and not have hibernate load up the object first, and then delete it), as well as have the option to rollback the deletes if something goes wrong.

The problem is, if there are many objects, or the objects are very large, issuing multiple delete() commands and storing them in the session cache until the transaction is committed may not be feasible. I just want to be able to delete the object and then get it out of memory. Any thoughts?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 11:11 am 
Newbie

Joined: Fri Jul 16, 2004 6:22 pm
Posts: 17
I've done some additional testing, and I'm not sure this is even possible... I think Hibernate is loading up the object to do dependency checking. Does this need to happen even if cascade = NONE? Any comments are welcome.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 11:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use direct JDBC for deleting without loading first, this is not possible with Hibernate - this has also been discussed numerous times already in this forum.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 11:28 am 
Newbie

Joined: Fri Jul 16, 2004 6:22 pm
Posts: 17
Thanks for your reply.

I thought that might be the case. I did search the forums, but nothing relevent turned up. Thanks again.


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.