NHibernate/Hibernate HQL 和 ICriteria 查询示例在哪里?

发布于 2024-08-12 01:05:46 字数 409 浏览 5 评论 0原文

我对 NHibernate 还很陌生,而且我正在掌握其中的大部分内容。我确实缺乏正确理解的一个领域是查询(至少当涉及到任何相当复杂的事情时)。

我通过示例学得最好,但我觉得我还没有真正能够在网络上找到那么多深入的查询示例。当然有很多 - 但有许多不同的技术和方法,并且大多数示例似乎掩盖了细节。

(例如在 nhibernate 官方文档中,ICriteria 解释包含 4 个句子!)

也许我只是看起来不够好? ;) 有人知道有很多查询示例的好资源(在网络上)吗? (最好是 HQL 和 ICriteria)。

I'm still quite new to NHibernate and most of it I'm getting to grips with. One area that I'm really lacking a proper understanding of though is querying (at least when it comes to anything reasonably complex).

I learn best by example, but I feel that I haven't really been able to find all that many in depth querying examples on the web. There are there are quite a few of course - but there are many different techniques and approaches, and most of the examples seem to gloss over the details.

(For instance in the official nhibernate documentation, the ICriteria explanation comprises 4 sentences!)

Maybe I just haven't looked well enough? ;) Does anyone know of any good resources (on the web) with lots of query examples? (Both HQL and ICriteria prefferably).

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

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

发布评论

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

评论(1

一身骄傲 2024-08-19 01:05:46

堆栈溢出。我是认真的 - 进入 HibernateNHibernate 标签并搜索 Criteria 和/或 HQL。有大量的问题/答案。我知道,因为我写了很多 :-)

NHibernate 手册部分 HQL条件< /a> 也有很多例子。

最后,如果您遇到问题,可以随时发布问题。当/如果您这样做时,请注意发布适当的映射/类/表可以更容易地理解/回答与 Hibernate 查询相关的任何问题。

StackOverflow. I'm serious - go into Hibernate and NHibernate tags and search for Criteria and / or HQL. There are tons of questions / answers. I know because I wrote a lot of them :-)

NHibernate manual sections on HQL and Criteria have quite a few examples as well.

Finally, you can always post a question if you're having trouble with something. When / if you do, be aware that posting appropriate mappings / classes / tables makes it a lot easier to understand / answer any question related to Hibernate queries.

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