Is it possible to delete a bunch of rows based on some column value using Query interface or the named query in the mapping xml ?
For ex, if we write the following query in xml :
<query name="delete.rptExpressions.for.particular.expressionID">
delete from RptExpression as rptExpression
where rptExpression.expressionID = ?
</query>
and the following code in java :
Query query = HibernateUtil.currentSession().getNamedQuery("delete.rptExpressions.for.particular.expressionID");
query.setInteger(0, expressionID);
query.list();
Will execution of the above code do delete for us ?
|