如何使用 NHibernate Criteria API 急切加载延迟加载属性/组件?
我的一个实体类中有一个延迟加载属性(组件)。在 HQL
中,我可以编写“获取所有属性”来急切地加载它。
我可以使用 Criteria API 做同样的事情吗?我尝试了 criteria.SetFetchMode("PropertyName", FetchMode.Eager)
但不起作用。我正在使用 NHibernate 3.1 GA
I have a lazy-loading property (component) in one of my entity classes. In HQL
I can write "fetch all properties" to eagerly load it.
Can I do the same with Criteria API? I tried criteria.SetFetchMode("PropertyName", FetchMode.Eager)
but is not working. I am using NHibernate 3.1 GA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论