I have a fairly deep graph of objects (5-6 nodes), and when I cross parts of it, NHProf tells me that I have a "Select N + 1" problem (which I do).
Two solutions that I know of
- Waiting for children to load
- Share my graphic object (and load the load)
I really don't want to do any of them (although I can split the graph separately later, as I see it)
Presently....
Is it possible to tell NHibernate (with FluentNHibernate) that whenever I try to access children to download them all at once, instead of select-n + 1-ing when I iterate over them?
I also get an "unlimited result set", which seems to be the same problem (or rather, will be solved using the above solution, if possible).
Each daughter collection (across the entire schedule) will have only about 20 members, but 20 ^ 5 is a lot, so I donβt want to download everything when I get the root, but just get the whole child when I get closer to it.
Edit: an afterthought .... what if I want to present paging when I want to display children? Do I have the opportunity to break my object chart here or is there some kind of secrecy that I can use to solve all these problems?
select nhibernate fluent-nhibernate
Andrew Bullock
source share