zl程序教程

您现在的位置是:首页 >  其它

当前栏目

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

The with object session value was already same
2023-09-27 14:24:39 时间

错误场景:

文章修改的时候,先使用id把原来的旧文章查出来,然后,获得作者信息,和当前提交修改的session中的用户的用户名进行比对

然后进行验证控制

参考这篇文章,比较老了,

https://blog.csdn.net/u012230055/article/details/40423903

 

hibernate 4这样用 session.clear();