What is the best way to delete all rows in a table in Hibernate?
If I iterate over a collection and call session.delete() it\'s not perform
session.delete()
You can use HQL for truncate table
public int hqlTruncate(String myTable){ String hql = String.format("delete from %s",myTable); Query query = session.createQuery(hql) return query.executeUpdate(); }