From d642fb9642812385cf4a8eff8f9ccc8749a12e81 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Wed, 10 Feb 2010 01:34:47 +0000 Subject: [PATCH] [2.0][DDC-307] Fixed wrong generation of SQL when using MOD() function --- lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)