NHibernate 3.0内置的Linq提供程序稳定吗?

发布于 2024-10-09 01:41:37 字数 115 浏览 4 评论 0原文

我可以依赖 NHibernate 3.0 内置的 Linq 提供程序来执行包含聚合函数(例如 Max 和 Min)以及包含字符串操作(例如 Contains、StartsWith 或 EndsWith)的复杂查询吗?

Can i depend on NHibernate 3.0 built-in Linq provider to perform complex queries contain aggregate functions such as Max and Min and contains string operations such as Contains, StartsWith, or EndsWith ??

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

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

发布评论

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

评论(3

晚雾 2024-10-16 01:41:37

我发现的值得注意的问题是:

  1. .OfType() 方法未实现,这可能是继承层次结构的问题。
  2. 不支持左连接
  3. 不平凡的分组操作不起作用(即使是像按组计数排序这样简单的操作)。
  4. Fetch() 必须是查询中的最后一个方法,这可能会使关联集合的分页变得困难。

然而,这绝对是 NHContrib 提供商的改进。

您列出的操作在通常情况下都可以很好地支持。

The noticeable problems I found is:

  1. .OfType() method is not implemented that can be a problem with inheritance hierarchies.
  2. Left joins are not supported
  3. Non-trivial group by operations do not work (even something as simple as sorting by group count).
  4. Fetch() must be the last method in the query which can make paging with associated collections difficult.

However, it is definitely an improvement from the NHContrib provider.

The operations you listed are supported just fine in the usual scenarios.

月下客 2024-10-16 01:41:37

关于 nhusers 名单存在很多争论,因为仍有不少问题悬而未决。

我会关注 nhusers 小组,
阅读一些帖子并做出你的
自己的心意起来了。 请参阅此处的帖子

就我个人而言,我发现 queryover 可以满足我需要的一切,因此我会等到 Linq 提供程序随着时间的推移变得更加稳定。

我建议加入 nhusers 小组以获得更好的感觉。

There has been much debate on the nhusers list as there are quite a few issues still outstanding.

I would look on the nhusers group and
read some of the posts and make your
own mind up. See here for posts.

Personally I have found that queryover does all that I need so I for one would wait until the Linq provider becomes more stable over time.

I would recommned in joining the nhusers group to get a better feel.

十级心震 2024-10-16 01:41:37

LINQ 提供程序比 Ayende 编写的提供程序更加稳定和先进。 (不是鄙视他写的内容,而是因为他写的内容让我再次拿起了 NH)

我认为我遇到的 NH 查询的唯一问题是复合类型。您可以在 EF/L2S 中执行这些操作,NH3 似乎生成了正确的 sql,但无法执行它。

我个人喜欢 QueryOver,它对我来说读起来更好。

The LINQ provider is far more stable and advanced than the one written by Ayende. (not dising what he wrote it was because of what he wrote that i picked up NH again)

I think the only issue I've come across with NH Query is composite types. You can do them in EF/L2S, and NH3 seems to generate the correct sql but fails to get to executing it.

Personally I like QueryOver, it reads better to me.

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