diff --git a/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php b/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php index b9bb92656..46af27fbf 100644 --- a/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php +++ b/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php @@ -45,7 +45,7 @@ class ModFunction extends FunctionNode public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { //TODO: Use platform to get SQL - return 'SQRT(' + return 'MOD(' . $sqlWalker->walkSimpleArithmeticExpression($this->_firstSimpleArithmeticExpression) . ', ' . $sqlWalker->walkSimpleArithmeticExpression($this->_secondSimpleArithmeticExpression)