I have an object model:
class EntityA
{
...
IList<EntityB> BList;
...
}
class EntityB
{
...
IList<EntityC> CList;
}
I need to get all the collections (Blist in EntityA and CList in EntityB), because if all of them are needed to perform some operations, if I will not load them, I will have the problem of choosing n + 1. Thus, the request was as follows:
select a from EntityA a left join fetch a.BList b left join fetch b.CList c
, , - , EntityA, - BList.
, , SQL, , , , SQL, , ( [] EntityA). :
query.SetResultTransformer(new DistinctRootEntityResultTransformer());
. . , , EntityB - CList.
, ? , , ...