Skip to content
Browse files

Merge pull request #52 from sandermarechal/paginate-where-not

Add support for paginating WHERE NOT ... queries
  • Loading branch information...
2 parents b745dcd + 9421b43 commit c84999ee9afb014f3158dde73a66542a82277224 @beberlei committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/DoctrineExtensions/Paginate/WhereInWalker.php
View
6 lib/DoctrineExtensions/Paginate/WhereInWalker.php
@@ -110,8 +110,10 @@ public function walkSelectStatement(SelectStatement $AST)
)
);
}
- // an OR clause
- elseif ($AST->whereClause->conditionalExpression instanceof ConditionalExpression) {
+ // an OR or NOT clause
+ elseif ($AST->whereClause->conditionalExpression instanceof ConditionalExpression
+ || $AST->whereClause->conditionalExpression instanceof ConditionalFactor
+ ) {
$tmpPrimary = new ConditionalPrimary;
$tmpPrimary->conditionalExpression = $AST->whereClause->conditionalExpression;
$AST->whereClause->conditionalExpression = new ConditionalTerm(

0 comments on commit c84999e

Please sign in to comment.
Something went wrong with that request. Please try again.