欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

NHibernate 错误

发布时间:2025/7/14 编程问答 60 豆豆
生活随笔 收集整理的这篇文章主要介绍了 NHibernate 错误 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

Unable to locate persister for the entity named 'Model.Customer'.
The persister define the persistence strategy for an entity.
Possible causes:
- The mapping for 'Model.Customer' was not added to the NHibernate configuration.

 

第一 xml文件必须为 *.hbm.xml

第二  设置xml文件为嵌入的资源,用鼠标点击右键 然后生成操作里 选择嵌入的资源即可解决。

文件命名没有问题,我把两个XML文件都改成了嵌入的资源

 

Could not interpret id generator strategy: GuidNative

GuidNative 改成 native

转载于:https://www.cnblogs.com/wuxl360/p/5865381.html

《新程序员》:云原生和全面数字化实践50位技术专家共同创作,文字、视频、音频交互阅读

总结

以上是生活随笔为你收集整理的NHibernate 错误的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。