Posted by Gerhard Stephan on 16th March 2009
It’s time to release a small patch that fixes two bugs regarding Projection and Grouping SQLs.
The first is a bug that appeared when trying to create a SQL statement that has conditions that are placed in a WHERE Clause and conditions that resists within the HAVING Clause. In the old version it was not possible to create such statements. After the current patch it’s possible.
In order to use conditions within the WHERE and within the HAVING Clause, the ICondition owns a property named "ConditionClause". This property can be used to specify wheather a condition is placed into the WHERE or the HAVING Clause. A ConditionList ( and that is new ) is defined as "Undefined" which means, that it can have childs that are placed in the WHERE or in the HAVING Clause. Using this trick allows you to pass the Select Method of the ObjectMapper .NET a ConditionList with child conditions that are set into the WHERE or in the HAVING Clause.
Furthermore a bug has been fixed that lead to wrong SQLs when trying to place a SubSelect into a Condition that queried a Projection Class of the same type as the SubSelect. In that case, the subselect used the aggregation methods of the surrounding Projection class. That bug has been fixed. The SubSelect does now ignore the surrounding projection class as you would expect.
For a better integration the INativePersister interface has been extended for creating and managing IDbCommand objects.
Furthermore a new functionality has been added to enrich an existing handwritten SQL with Server Side Paging informations. This feature is still under development and does not work with all persisters. But there’s more to come.
Wish you happy coding.