From 1e9e2de73740667de49847392d978eb4847217a2 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Fri, 13 May 2011 00:12:05 -0300 Subject: [PATCH] [DDC-1122] Added coverage for bug report. --- tests/Doctrine/Tests/ORM/Functional/QueryTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php index ac05749be..d8937289a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php @@ -487,4 +487,18 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertEquals(2, count($users)); } + + public function testQueryBuilderWithStringWhereClauseContainingOrAndConditionalPrimary() + { + $qb = $this->_em->createQueryBuilder(); + $qb->select('u') + ->from('Doctrine\Tests\Models\CMS\CmsUser', 'u') + ->innerJoin('u.articles', 'a') + ->where('(u.id = 0) OR (u.id IS NULL)'); + + $query = $qb->getQuery(); + $users = $query->execute(); + + $this->assertEquals(0, count($users)); + } } \ No newline at end of file