今天突然让我发现原来 NHibernate 支持的数据库里面包含有一 SQLite ,看名字就觉得这个数据库肯定够轻量!!!在 SQLite http://www.sqlite.org 的官方网站看这个数据库竟然支持到 2TB 哦!!!又无需服务端,无需客户端!

        不过,今天在试用 NHibernate 来访问 SQLite ,却让我遇到了想不到的 Exception ,具体是:NHibernate.MappingException: Unknown entity class: WinFormApp.User 。

        在 子非鱼 http://sifang2004.cnblogs.com/archive/2005/09/05/230713.html 中找到:

编译并运行测试,CustomerFixture的TestCRUD操作还是不能通过! 异常信息为:
NHibernateTest.CustomerFixture.TestCRUD : NHibernate.MappingException : Unknown entity class: NHibernateTest.Customer 
显然,是因为我们还没有为Customer对象编写映射文件,而导致NHB不能对Customer对象进行持久化操作。

        但我也有了这个映射文件了呀!!!

        就是不知道为何会如此啊!!!

相关文章:

  • 2022-01-24
  • 2021-07-22
  • 2021-05-18
  • 2021-07-28
  • 2021-10-12
  • 2021-05-08
  • 2021-11-15
猜你喜欢
  • 2021-12-05
  • 2022-03-01
  • 2021-07-29
  • 2021-08-03
  • 2021-11-17
  • 2022-01-25
  • 2021-08-23
相关资源
相似解决方案