关于NHibernate的一些问题

bong_shakalaka 2021-01-20 02:19:17
NHibernate.InvalidProxyTypeException
The following types may not be used as proxies:
SSO.Model.Entities.DEPART_DICTIONARY: method obj_address should be virtual
SSO.Model.Entities.PUB_SYSLOG: method obj_address should be virtual
SSO.Model.Entities.PUB_DEPATMENT_POINT: method obj_address should be virtual
SSO.Model.Entities.PUB_POINTUSER: method obj_address should be virtual
SSO.Model.Entities.PUB_POWER: method obj_address should be virtual
SSO.Model.Entities.PUB_USER_POINTUSER: method obj_address should be virtual
Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): NHibernate.

Exception stack trace:
at NHibernate.Cfg.Configuration.Validate () [0x00000] in <filename unknown>:0
at NHibernate.Cfg.Configuration.BuildSessionFactory () [0x00000] in <filename unknown>:0
at SSO.DAL.SessionFactory..cctor () [0x00000] in <filename unknown>:0

我的这些类中并没有obj_address这个方法,而且所有的都已经加了virtual,报这个错误是为什么呢?
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
以及下面这个bug
NHibernate.InvalidProxyTypeException
The following types may not be used as proxies:
Model.Entities.PlotPlan: method obj_address should be virtual
ThematicSys.MatchTask: method obj_address should be virtual
ThematicSys.PubMessage: method obj_address should be virtual
ThematicSys.PubFlowNodes: method obj_address should be virtual
Model.Entities.Pub_DataUpLoadFiles: method obj_address should be virtual
Model.Entities.ErrorCheck: method obj_address should be virtual
ThematicSys.PubCaseInfo: method obj_address should be virtual
Model.Entities.Pub_CaseInfo: method obj_address should be virtual
ThematicSys.PubCaseCache: method obj_address should be virtual
Model.Entities.Pub_Message: method obj_address should be virtual
Model.Entities.Pub_DataUpLoadInfo: method obj_address should be virtual
ThematicSys.PubPointUser: method obj_address should be virtual
Model.Entities.Pub_CaseCache: method obj_address should be virtual
Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): NHibernate.

Exception stack trace:
at NHibernate.Cfg.Configuration.Validate () [0x00000] in <filename unknown>:0
at NHibernate.Cfg.Configuration.BuildSessionFactory () [0x00000] in <filename unknown>:0
at DAL.SessionFactory..ctor () [0x00000] in <filename unknown>:0
at DAL.SessionFactory.getSessionFactory () [0x00000] in <filename unknown>:0
at DAL.SiteDAL..ctor () [0x00000] in <filename unknown>:0
at DAL.SiteDAL.get_instance () [0x00000] in <filename unknown>:0
at BLL.SiteBLL..ctor () [0x00000] in <filename unknown>:0
at SiteInfoHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
...全文
101 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧