1 会碰到”Not supported for DML operations [delete “问题,解决方法,加上Modifying注解
2 删除 更新没有反应 @Rollback(value = false)
@Rollback(value = false)标签:count,hibernate,Rollback,value,细节,false,userDao From: https://www.cnblogs.com/mljqqh/p/17703188.html
@Transactional
@Test
public void delUser(){
userDao.deleteByName("mljqqh");
long count = userDao.count();
System.out.println("count = " + count);
}