【发布时间】:2012-03-11 08:20:44
【问题描述】:
我正在使用 JPA 。运行多个事务时出现以下错误。
例如添加
添加事件 21
添加事件 22
删除22
删除21
现在,当我添加一个新事件时,它表明另一个对象已与此会话相关联。
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.domain.Event#22]
我想我明白发生了什么,但不知道如何解决这个问题。
谢谢
【问题讨论】: