(An attempt to clarify my previous question,)
assume three tables implementing a parametrized n:n relationship, using a one-to-many and many-to-one mapping. The table to the right has an 1:n relationship to a fourth table(, which represents aggregation). The fourth table has an additional level of 1:n aggregates in a fifth table, in principle this could extend indefinitely, but what I have is these five tables.
Q: In terms of a number of SQL statements generated, what is the most efficient way to load data from all of these tables? I need the objects on the "leftmost" table to be returned as the handle to the object graph.
The approach I posted before explodes the number of generated SQL statements at the aggregate "junction". I did set all mappings eager and outer-join. I found several threads hovering around similar issues, but found little to solve this...
//markku
PS. not yet posting the mappings in an attempt to keep the question short (!) and generic....
|