ICriteria Subqueries Patch with sql 2005 Paging Fixes
"Will Shaver" <[email protected]> Thu, 17 Jul 2008 19:42:10 -0700
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
http://jira.nhibernate.org/browse/NH-1359 I spent pretty much all day getting several different bugs worked out of the criteria subquery projection code. Several of the bugs that I worked on were in the sql 2005 paging code, so if people had problems getting things to work before it may be worth taking a look at this patch. I have a passing unit test that uses: * Filter Parameters * Criteria Subqueries * Sorting * Paging * Subquery and outer query restrictions * Relationships in subquery and outer query It was a major pain to get all of these pieces working together... but I'm now using it in my application to do auto-column sorting on a grid view off of a subselect which is 4 relationships away from the primary entity! The previous sql 2005 paging code assumed that it needed to create an alias for everything it was going to page such as: "__hibernate_sort_expr_1__" This caused missing parameters to occur in subselects and I believe other things such as switch-case statements. I've replaced this with some logic that determines if that exact same column or subquery is already being selected and doesn't duplicate it if so. This also means easier to debug log files. :) Enjoy... -Will ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nhibernate-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development