Nhibernate 部分急切加载子集合
如果我有一个父对象(Parent),它有一个 List(Of Child) 对象作为多一关系。是否可以返回一个父对象及其子对象的子集(热切加载)?我正在使用 VB 和 Criteria。
例如,如果父级 1 有 50 个子级(20 个类型 X 30 个类型 Y),并且我想返回父级以及仅包含类型 X 的集合。
我只想要一个大小为 20 且急切加载子级的集合?
谢谢
If I have a parent object (Parent) which has a List(Of Child) objects as a many-one relationship. Is it possible to return a Parent with a subset of it's child objects (eagerly loaded)? I am using VB and Criteria.
e.g. If Parent 1 has 50 children (20 type X 30 type Y) and I want to return the Parent with a collection containing only type X.
I only want a collection with a size of 20 with it's eagerly loaded children?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HQL查询。 fetch 关键字将与父级一起初始化子级。
HQL query. The fetch keyword will initialize the children along with the parent.