几种原因:

1、配置文件后缀名写错 mapping file 必须是.hbm.xml结尾

2、Web.config配置里面引用实体

 

<session-factory>

........................

<mapping assembly="Project.DomainModel"/>  <!-- Here -->
</session-factory>

3、hibernate 的mapping 配置文件是xml,属性必须设置成“嵌入的资源

相关文章:

  • 2022-03-03
  • 2022-12-23
  • 2021-04-02
  • 2021-11-05
  • 2021-06-06
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-05-30
相关资源
相似解决方案