Open Levvy055 opened 9 years ago
Yeah, and there is already is a method for it in H
public static <T> void delete(T entity) {
HibernateObjectQuery.delete(entity);
}
A problem is with not delete request but with any HQL update request. I have made an error in code just writing
H.update("delete from User") ;
without execute()
so than just H.execute(hql) would be best cause 'update' can be mistaken
Yeah, you are right...but there is a problem with query named parameters
H.update("delete from User where pid = :pid") .p("pid", pid).execute();
not better H.delete(object) ?