a lot of time people are asking how they should efficiently query a whole object graph with NHibernate. the answer is always - fetch mode join the many-to-one associations, and then issue a seperate query for each association
i think, by implementing a FetchMode.SubSelect that can be set for a specific association in a specific query/criteria on the root entity, it could be done very easily (querying the whole graph will be easy, not neccessarily implementing the new fetch mode). the fetch="subselect" idea is available in the mappings only (and isn't that efficient) and not for a specific hql\linq\criteria query but for the mapings of the entity, and cannot be overriden with regular lazy loading. in theory, everything nhibernate needs to do that is available. i've opened a JIRA: *NH-2316 <http://216.121.112.228/browse/NH-2316>* i'll be happy to hear your inputs on the idea -- 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.
