NHibernate异常:No persister for的解决办法

我这里是hbm.xml文件出问题了

出现No persister for错误后有如下三种解决办法: 
1》检查hbm.xml文件。 
2》检查cfg.xml文件,看看类的hbm.xml文件名是不是已经写上了。 
3》对于one-to-many(Parent-to-Child)的关系,应该是 
child.setParent(parent),而不是child.setParent(parent.id)

原文参考:http://blog.csdn.net/terryhuang/article/details/1647537

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2021-07-04
  • 2021-06-07
  • 2021-05-25
  • 2021-12-04
猜你喜欢
  • 2021-11-11
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2021-10-21
  • 2021-11-20
相关资源
相似解决方案