您的位置:首页 > 移动开发 > Objective-C

a different object with the same identifier value was already associated with the session

2014-08-06 11:31 543 查看
a different object with the same identifier value was already associated with the session。
  错误原因:在hibernate中同一个session里面有了两个相同标识但是是不同实体。

原因,我在service类的一个方法中使用了两个相同identifier(标志)的bean,而我配置的spring事务管理是针对service类的,这就导致了一个session中有两个相同的bean产生冲突,这时只需要把两个bean的获取放到两个方法中就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐