update
This commit is contained in:
@@ -47,7 +47,7 @@ public abstract class GenericDaoImpl<T, ID> implements GenericDao<T, ID> {
|
||||
public void delete(ID id) {
|
||||
try (Session session = sessionFactory.openSession()) {
|
||||
session.beginTransaction();
|
||||
T entity = session.get(entityClass, id);
|
||||
T entity = session.find(entityClass, id);
|
||||
if (entity != null) session.remove(entity);
|
||||
session.getTransaction().commit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user