Let's say I have an Entity A that has subentities B & C in one to many, and B and C in turn have a number of subentities and so on. I load A, and tell it to prefetch all subentities, but that takes too long. The crossproduct gets too large. It's not that bad if i load A->B->B's hierarchy in a HQL query, nor if I load A->C->C's hierarchy in a query.
So I would like to load A and it's hierarchy, but in multiple steps rather than one HQL. The objective is to load them all into one bean representing the header entity A. Can Hibernate do that? If so, how would I get that done? Currently I use the Query objects and am not into the criteria language, so via HQL is preferred but i'll do it via criteria if I have to.
Anyone have ideas?