public override void VisitNhHavingClause(NhHavingClause havingClause, QueryModel queryModel, int index) { var visitor = new SimplifyConditionalVisitor(); havingClause.Predicate = visitor.Visit(havingClause.Predicate); // Visit the predicate to build the query var expression = HqlGeneratorExpressionVisitor.Visit(havingClause.Predicate, VisitorParameters).ToBooleanExpression(); _hqlTree.AddHavingClause(expression); }
public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index) { // Visit the predicate to build the query var expression = HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).AsBooleanExpression(); if (whereClause is NhHavingClause) { _hqlTree.AddHavingClause(expression); } else { _hqlTree.AddWhereClause(expression); } }
public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index) { var visitor = new SimplifyConditionalVisitor(); whereClause.Predicate = visitor.VisitExpression(whereClause.Predicate); // Visit the predicate to build the query var expression = HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).ToBooleanExpression(); if (whereClause is NhHavingClause) { _hqlTree.AddHavingClause(expression); } else { _hqlTree.AddWhereClause(expression); } }