关于NHibernate的一些问题
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