在开发中发现如果有事务管理的话,查询对象出来进行set属性修改,在没有update之前再次查询,会提交之前的对象。
解决方法:userDAO.getSessionFactory().getCurrentSession().evict(user);
在开发中发现如果有事务管理的话,查询对象出来进行set属性修改,在没有update之前再次查询,会提交之前的对象。
解决方法:userDAO.getSessionFactory().getCurrentSession().evict(user);