解决 a different object with the same identifier value was already associated with the session 报错

用 hibernate 做批量添加操作时,报错:a different object with the same identifier value was already associated with the session 报错。 网上搜到一些,解决方法,如用 session.merge(),用 session.clear() 等,都不管用。   然后又搜到一篇博客,说到的方法管用: http
相关文章
相关标签/搜索