Commit 24d8e942 authored by beberlei's avatar beberlei

[2.0] DDC-478 - Fix QueryBuilder Expr\Between Support

parent 49621286
......@@ -544,7 +544,7 @@ class Expr
*/
public function between($val, $x, $y)
{
return new Expr\Func('BETWEEN', array($val, $x, $y));
return $val . ' BETWEEN ' . $x . ' AND ' . $y;
}
/**
......
......@@ -232,7 +232,7 @@ class ExprTest extends \Doctrine\Tests\OrmTestCase
public function testBetweenExpr()
{
$this->assertEquals('BETWEEN(u.id, 3, 6)', (string) $this->_expr->between('u.id', 3, 6));
$this->assertEquals('u.id BETWEEN 3 AND 6', (string) $this->_expr->between('u.id', 3, 6));
}
public function testTrimExpr()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment