1
0
mirror of synced 2024-12-14 07:06:04 +03:00

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

This commit is contained in:
beberlei 2010-03-28 10:30:43 +00:00
parent 49621286a2
commit 24d8e94280
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}
/**

View File

@ -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()