Posted By

arunpjohny on 09/03/07


Tagged

Hibernate


Versions (?)

Mass Delete - Hibernate 3


 / Published in: Java
 

Deleting rows from a table using hibernate 3.

  1. Single object
  2. -------------
  3. HibernateTemplate.delete(Object);
  4.  
  5.  
  6. Multiple Objects - Condition
  7. ----------------------------
  8. Query deleteQuery = session.createQuery( "delete Employee employee where employee.age > 58");
  9. int count = deleteQuery.executeUpdate();

Report this snippet  

You need to login to post a comment.