在appfuse webwork1.8.2 里遇到该问题 a different object with the same identifier value was already associated with the session 在对应的dao实现里修改save方法,在异常情况使用merge方法即可 public void saveWapuserdownlog(final Wapuserdownlog wapuserdownlog) { try{ /** * TODO:wcf * 如果无法保存或更新,就进行合并 */ getHibernateTemplate().saveOrUpdate(contentattributetype); }catch(Exception e){ getHibernateTemplate().merge(contentattributetype); } }
a different object with the same identifier value was already associated with the session的解决办法
最新推荐文章于 2023-08-08 22:36:16 发布