NHibernate/Hibernate HQL 和 ICriteria 查询示例在哪里?
我对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
堆栈溢出。我是认真的 - 进入
Hibernate
和NHibernate
标签并搜索Criteria
和/或HQL
。有大量的问题/答案。我知道,因为我写了很多 :-)NHibernate 手册部分 HQL 和 条件< /a> 也有很多例子。
最后,如果您遇到问题,可以随时发布问题。当/如果您这样做时,请注意发布适当的映射/类/表可以更容易地理解/回答与 Hibernate 查询相关的任何问题。
StackOverflow. I'm serious - go into
Hibernate
andNHibernate
tags and search forCriteria
and / orHQL
. 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.