Skip to content

Commit

Permalink
Merge pull request #204 from ostrolucky/patch-1
Browse files Browse the repository at this point in the history
Remove old InExpression workaround
  • Loading branch information
polc authored Aug 3, 2018
2 parents 72dacb4 + 26f5246 commit f0f8303
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,9 @@ public function walkSelectStatement(SelectStatement $AST)
$count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT);

if ($count > 0) {
// in new doctrine 2.2 version theres a different expression
if (property_exists('Doctrine\ORM\Query\AST\InExpression', 'expression')) {
$arithmeticExpression = new ArithmeticExpression();
$arithmeticExpression->simpleArithmeticExpression = new SimpleArithmeticExpression(
array($pathExpression)
);
$expression = new InExpression($arithmeticExpression);
} else {
$expression = new InExpression($pathExpression);
}
$arithmeticExpression = new ArithmeticExpression();
$arithmeticExpression->simpleArithmeticExpression = new SimpleArithmeticExpression(array($pathExpression));
$expression = new InExpression($arithmeticExpression);
$ns = self::PAGINATOR_ID_ALIAS;

for ($i = 1; $i <= $count; $i++) {
Expand Down

0 comments on commit f0f8303

Please sign in to comment.