原因:

     程序调用NHibernateHelper时,会编译配置文件hibernate.cfg.xml中包含的映射文件,如果某个映射文件中的实体类属性与数据库不能映射,即会报这个错误。

 

解决方案:

   跟踪测试错误:

 

  点击“查询详细信息”可以看到详细错误原因:

在提示框中可以看到如下信息:

Message:"Could not compile the mapping document: ESLG.Entity.PayBillingClient.hbm.xml"

InnerException [NHibernate.PropertyNotFoundException]

{"Could not find a getter for property 'LastOwe' in class 'ESLG.Entity.PayBillingClient'"}

    即可看出原因是:不能在实体类中找到'LastOwe' 的属性。

posted on 2009-12-16 16:04  Kein  阅读(5856)  评论(0编辑  收藏  举报