更新資料時出現錯誤訊息 :
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.jida.surgery.orm.Application#8]
Solution:
原本用 session.update(entity) , 改為 session.merge(entity) 就 OK 了.
Reference:
http://hi.baidu.com/limeng1028/blog/item/275fbd12200544cdc2fd7828.html
沒有留言:
張貼留言