Hi Dmitiry, thanks for trying to answer my question. I need a query that loads the entire tree because it gets displayed in a TreeView user-interface control. It's a sizable tree, but in reality it only takes just half a second to load using subselect fetch optimization.
Regarding your suggestion, I am trying to minimize round trips to the database, which is why I'm hoping to avoid that approach. I don't know what you mean by "you could easily flatten it to a list". On Aug 3, 6:51 pm, Dmitiry Nagirnyak <[email protected]> wrote: > I would first ask for your use-case. Why do you need to load all tree > via query ONLY? > > Why can't you use different optimizations (fetch types etc) and > retrieve the root of tree and then get all the rest the object. > Yes, it won't make it in a single query. > But you could easily flatten it to a list. > > If you could provide a sample with a test then it would help guys here > to understand what exactly you need. > > Also did you see > this:http://stackoverflow.com/questions/653833/is-it-possible-to-eager-loa... > > I might be wrong in some senmtences here as I have just started using NH. > > Cheers, > Dmitiry. > > > What I'm asking is: what code can I write against the NH API that will > > retrieve the entire Category tree AS IF I had lazy="false" on the > > SubCategories mapping. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
