org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常,解决方案:在Update()方法前加上session.clear();
也有人说把update方法改成merge().我用的是clear,结果非常好用
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常,解决方案:在Update()方法前加上session.clear();
也有人说把update方法改成merge().我用的是clear,结果非常好用