@import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
1、HibernateException: Found shared references to a collection解決之道
引起此錯誤的原因有兩種,一是多Session並發操作,二是one-to-many的Set中有被多次引用的狀況。
解決的方式:對於第一類,最好是在同一個Session中搞定這些操作,對於第二類操作,一般可以使用Lazy模式,也 可以在程序中保証不多次引用同樣的Set。
posted on 2006-12-22 14:35
Robin's Programming World 閱讀(3217)
評論(0) 編輯 收藏 所屬分類:
Java