问题描述
我在一个人方法里调用了3个持久化跟新getPersistService().merge(set);代码如下:/**(non-Javadoc)更换组长*/@OverridepublicvoidSetMyMaster(DeleteMenberCrisetBean){//获取群组原组长,取消原组长。MenberBeanmenberBean=getMenberlist.get(0);GroupmembercancelsourseMaster=getPersistService().find(Groupmember.class,menberBean.getGrp_member_ky());cancelsourseMaster.setRelative("其他");cancelsourseMaster.setMember_priority(3);getPersistService().merge(cancelsourseMaster);//第一个//设置新组长GroupmembersetNewMaster=getPersistService().find(Groupmember.class,setBean.getGrp_member_ky());setNewMaster.setRelative("组长");setNewMaster.setMember_priority(0);getPersistService().merge(setNewMaster);//第二个//跟新群组信息HomegroupsetMster=getPersistService().find(Homegroup.class,menberBean.getCustomergroupky());Cuspersoncusperson=getPersistService().find(Cusperson.class,setBean.getCorpersonky());setMster.setCusperson(cusperson);getPersistService().merge(setMster);//第三个}//Groupmember、Cusperson和Homegroup是实体出现的问题是数据库数据没变化,就是没更新成功,求大神为我这个菜鸟解惑!万分感谢