日期:2014-05-20  浏览次数:20802 次

遇到这种异常怎么解决?
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated wit[b][/b]h the session: [com.ts357.five.entity.SalChance#12]

------解决方案--------------------
主键冲突,查看配置文件是否正确
------解决方案--------------------
你是不是使用了根据主键查询这个方法???
如果是的,看一下配置文件,或是数据库中是否设置了主键,如果没有,就先设置主键再重新生成Pojo和配置文件