a different object with the same identifier value was already associated with the session
错误场景:
文章修改的时候,先使用id把原来的旧文章查出来,然后,获得作者信息,和当前提交修改的session中的用户的用户名进行比对
然后进行验证控制
参考这篇文章,比较老了,
https://blog.csdn.net/u012230055/article/details/40423903
hibernate 4这样用 session.clear();

浙公网安备 33010602011771号