NHibernate部分错误
生活随笔
收集整理的這篇文章主要介紹了
NHibernate部分错误
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、Found ?Two representations of same collection
解決:將包含該對象的主檔內(nèi)的相應(yīng)集合對象設(shè)置為null
2、identifierof an instance of。。
解決:清除緩存后再對主檔的Sq進(jìn)行編輯
3、object refences an unsaved transient instance - save this .....
原因:可能是因為在<mang-to-one>中配置了not-found="ignore"屬性,而引發(fā)新增時,外聯(lián)表對象不屬于持久化對象
解決:將主檔所對應(yīng)的外聯(lián)表對象設(shè)置為null
4、Unexpected row count:0; expetced: 1
原因:主檔的外聯(lián)表數(shù)據(jù)被刪除而出現(xiàn)的代理錯誤
解決:在<mang-to-one>中配置not-found="ignore"屬性,可以是外聯(lián)表數(shù)據(jù)被刪除時返回Null
轉(zhuǎn)載于:https://www.cnblogs.com/ahl5esoft/archive/2011/07/27/2118784.html
總結(jié)
以上是生活随笔為你收集整理的NHibernate部分错误的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle 游标(cursor) 说明
- 下一篇: Beginning C# Objects