Querying Over Multiple Child Collections With NHibernate

Typically with NHibernate, I’m always querying over one table and eager fetching it’s child collections. I’m also only performing WHERE conditions on that initial table I am querying over.

The other day though, I needed to solve a problem where I was adding WHERE conditions to the child collections. Now in SQL, this is quite easy but in NHibernate, it took me a while to figure out how to do this efficiently.

Continue reading