hibernate同一个更新操作为什么执行2次

我执行了一个更新操作,然后他执行了2遍sqlpublicbooleanupdateYhjbxx(Yhjbxxyhjbxx){//TODOAuto-generatedmet... 我执行了一个更新操作,然后他执行了2遍sql
public boolean updateYhjbxx(Yhjbxx yhjbxx) {
// TODO Auto-generated method stub
boolean b=true;
try {
UserInformation userinformation=this.userinformationdao.getUserinformation(yhjbxx.getYhid());
userinformation.setName(yhjbxx.getDlmc());
userinformation.setPassword(ToolUnit.decrypto(yhjbxx.getKl()));
//更新userinformation
this.userinformationdao.updateUserinformation(userinformation);
//更新用户基本信息表
this.yhjbxxdao.updateYhjbxx(yhjbxx);
} catch (Exception e) {
// TODO Auto-generated catch block
b=false;
e.printStackTrace();
}
return b;
}

这是执行更新的biz
展开
 我来答
OverLink
2012-10-22 · 超过21用户采纳过TA的回答
知道答主
回答量:86
采纳率:0%
帮助的人:66.1万
展开全部
//更新userinformation
this.userinformationdao.updateUserinformation(userinformation);
//更新用户基本信息表
this.yhjbxxdao.updateYhjbxx(yhjbxx);
程序中也是执行两次啊
追问
是this.yhjbxxdao.updateYhjbxx(yhjbxx);执行了2次  上边那个因为没有变化数据,然后就没执行。。。我要问的就是为什么下边这个执行了2遍。上面那个没关系
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式