NHibernate配置引发的异常

NHibernate.Cfg.Configuration”的类型初始值设定项引发异常

.添加引用 log4net.dll  Iesi.Collections.dll NHibernate.dll

 

 

 

关于NHibernate异常The following types may not be used as proxies 

 

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns=" urn:nhibernate-mapping-2.2">
<class name="Model.Customer, Model" table="Customer" lazy="false">
……

……
</class>
</hibernate-mapping>

1.未能找到元素“urn:nhibernate-mapping-2.0:hibernate-mapping”的架构信息
把 原来的urn:nhibernate-mapping-2.0改为urn:nhibernate-mapping-2.2

2 .在class中添加lazy=false.

 

 

posted @ 2010-02-08 16:26  Magicam  阅读(229)  评论(0编辑  收藏  举报