Very true. If deep hierarchies are needed, I'd say that maintaining a materialized path (concatenate the id:s leading up to the specific entity) in a column/property is the best way (nested sets also work, but tends to be massively complicated).
/G 2011/1/18 Markus Zywitza <[email protected]> > Hi Eric > > 2011/1/18 Eric <[email protected]>: > > For retrieiving a hierarchy in a single sql exec, I know that the > > following works with the appropriate mappings setup: > > if I'm not totally wrong, this only loads 2 levels of the hierarchy. > If you have more than two levels below p, you'll have an n+1 on > summing up your totals in code. If you sum up the total in HQL, tasks > below c (e.Children) will be completely omitted. > > -Markus > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
