benhyrman wrote:
How is the root related to the children? If the children are represented as collections, then marking the collections as lazy-loaded should help.
This is what I have been doing.. as I said the real problem is that NHibernate has been known to ignore my SetFetchMode on many occasions and build a large object graph unneccessarily... I still haven't been able to find out why...
Also, this approach requires you to explicitly "switch off" all the collections, which requires you to change the queries each time you add another collection to the root entity.. Now, I'd prefer a technique to specifically load the root entities only without having to worry about the rest of the object graph.
Now, as for the using a different entity with no collections, there is pragmatic and there is outrageously pragmatic! Thanks for the idea anyway!