使用hibernate写的代码,执行时怎么才可以实现更新?
//以下语句是选择出user,我采用逐行调试的方法,运行完一行,修改一下数据库中张三的性别,但运行到bean5那一行,bean5的性别还是没有修改。求实现方法。Userb...
//以下语句是选择出user,我采用逐行调试的方法,运行完一行,修改一下数据库中张三的性别,但运行到bean5那一行,bean5的性别还是没有修改。求实现方法。
User bean1 = userDao.selectBean(" where username='zhangshan'");
User bean2 = userDao.selectBean(" where username='zhangshan'");
User bean3 = userDao.selectBean(" where username='zhangshan'");
User bean4 = userDao.selectBean(" where username='zhangshan'");
User bean5 = userDao.selectBean(" where username='zhangshan'"); 展开
User bean1 = userDao.selectBean(" where username='zhangshan'");
User bean2 = userDao.selectBean(" where username='zhangshan'");
User bean3 = userDao.selectBean(" where username='zhangshan'");
User bean4 = userDao.selectBean(" where username='zhangshan'");
User bean5 = userDao.selectBean(" where username='zhangshan'"); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询