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.