The little query that could

time to read 2 min | 226 words

It looks likes I still have a lot to learn about NHibernate, today I took a foray into criteria's projections, which are new and exciting to me, but what excites me right now is this little puppy. It is not that the query is terribly complicated, it is that this is traversing six tables as easily as it can be. From the Multi Query reference, you can probably understand why I am excited, I need to get ~6 results sets for this to work, and it is looking like this is going to be very easy to do it in a performant way.

(Image from clipboard).png

You have to realize, I am at the point when I am running passing tests in the debugger, just to check out how cool this is. In the time that it took me to write this post, I have implemented the bare bones of what is most probably the hardest part of the system. This particular functionality requires data from 30(!) tables. The final query is over 5Kb in size, and goes on for 3 pages. (I am talking about the final query, not the one above.)

And to forestall the obvious questions, yes, I use this color scheme sometimes, I amuses me.