-->
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.  [ 1 post ] 
Author Message
 Post subject: Disable the use of the entity version in hibernate queries
PostPosted: Mon Sep 19, 2011 5:47 pm 
Newbie

Joined: Mon Sep 19, 2011 5:01 pm
Posts: 2
Is there a way to make Hibernate generate more efficient SQL when deleting or updating a collection?

For example for deleting a collection of 20 items Hibernate executes 20 delete queries. Here is the SQL printed to the console:
Code:
delete from Control_Parameter where Parameter_ID=? and Row_Version=?
Code:


What do I need to do to make Hibernate create the following efficient query instead?
Code:
delete from Control_Parameter where Parameter_ID in (?,?,?,?...)

In this case Parameter_ID is a foreign key from the parent object.
I am using Hibernate 3.6.3 Final

Thank you very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.