使用IN进行批量删除:
String hql = "DELETE FROM EntityName WHERE id IN(:ids)";
Query query = this.getSessionFactory().getCurrentSession().createQuery(hql);
query.setParameterList("ids", ids.split(","));
query.executeUpdate();
使用IN进行批量删除:
String hql = "DELETE FROM EntityName WHERE id IN(:ids)";
Query query = this.getSessionFactory().getCurrentSession().createQuery(hql);
query.setParameterList("ids", ids.split(","));
query.executeUpdate();