流畅的 Nhibernate 和 hbms

发布于 2024-08-31 07:14:23 字数 78 浏览 4 评论 0原文

作为FNH用户,您是否发现有时需要用hbm文件来补充FNH?您遇到过哪些相对常见的边缘情况(如果有)?

干杯,
贝里尔

As an FNH user, do you find you sometimes need to supplement FNH with an hbm file? Any relatively common edge cases where you do, if so?

Cheers,
Berryl

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夜夜流光相皎洁 2024-09-07 07:14:23

如果您需要使用命名查询,您将需要使用 hbm 文件,并且您可能会使用命名查询来调用存储过程,无论这是因为您有旧的存储过程要调用,可能是性能,还是在我最近的情况下,进行全文搜索。有关设置的更多信息,请参阅此处此处

If you need to use named queries you will need to use an hbm file and you would probably use a named query to call a stored procedure whether this be because you have legacy stored procs to call, possibly performance or in my most recent case, to do a full text search. More info on setting this up can be found here and here.

冷情妓 2024-09-07 07:14:23
  1. 当 Fluent NHibernate 中的错误禁止某些操作时。每个版本的错误较少,但您最终可能会发现一些错误(最近的错误是当存在某些自动映射约定时无法映射字典)

  2. 当您有一个遗留系统(使用 hbms 映射)时需要添加新的域对象(使用 fnh 和/或自动映射映射)。

  1. When a bug in Fluent NHibernate prohibits something. There are less bugs each release, but you might find some eventually (the most recent is the inability to map dictionaries when certain auto mapping conventions exist)

  2. When you have a legacy system (mapped using hbms) for which you need to add new domain objects (mapped using fnh and/or automapping).

薄情伤 2024-09-07 07:14:23

我在我的(迄今为止唯一一个)NHibernate 项目中使用 FNH Automapping。

起初,我必须编写几个 FNH 重写来解决错误。但 FNH 团队很快就修复了这些错误,并且我能够完全消除覆盖。

从来不需要处理 HBM 文件,我希望它保持这种状态!

I'm using FNH Automapping on my (so far, one and only) NHibernate project.

At first, I had to write a couple of FNH overrides to work around bugs. But the bugs were quickly fixed by the FNH team, and I was able to eliminate the overrides completely.

Never had to deal with the HBM files, and I hope it stays that way!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文