錯誤中學習--a different object with the same identifier value was already associated with the session

出現如下錯誤 a different object with the same identifier value was already associated with the session的場景是: 我直接用hql的update(obj)更新一條數據,但是有兩個字段因爲沒有值被更新成了null,所以想在更新前,先把這兩個字段查出來賦值給實體類,這樣更新的時候可以用到原來的值 我在service
相關文章
相關標籤/搜索