麻烦问大家一下,我在使用hibernatetemplate的时候,想要执行一个语句比如 delete from 表 where user_name=? and password =? 。这个时候我就想要用hql或者其他方式,此时大家在公司里边都是怎么做的?是用hibernatetemplate获得sessionfactory然后获得session接着获得query然后再用hql吗?还是有其他更好的方法,我目前就是用的上述方法