Mass Delete - Hibernate 3


/ Published in: Java
Save to your folder(s)

Deleting rows from a table using hibernate 3.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.