[2.0] DDC-478 - Fix QueryBuilder Expr\Between Support
This commit is contained in:
parent
49621286a2
commit
24d8e94280
@ -544,7 +544,7 @@ class Expr
|
|||||||
*/
|
*/
|
||||||
public function between($val, $x, $y)
|
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()
|
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()
|
public function testTrimExpr()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user