From cb892736ebadb13da46e3ac50c23900f2d040b8b Mon Sep 17 00:00:00 2001 From: Sander Marechal Date: Wed, 14 Mar 2012 07:58:58 +0100 Subject: [PATCH] Fix GROUP BY clauses for PostgreSQL --- tests/Doctrine/Tests/ORM/Functional/PaginationTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php index fd8e7f934..28e18f0de 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php @@ -52,7 +52,7 @@ class PaginationTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testCountComplexWithOutputWalker() { - $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g.id HAVING COUNT(u.id) > 0"; + $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g HAVING COUNT(u.id) > 0"; $query = $this->_em->createQuery($dql); $paginator = new Paginator($query); @@ -101,7 +101,7 @@ class PaginationTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testIterateComplexWithOutputWalker() { - $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g.id HAVING COUNT(u.id) > 0"; + $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g HAVING COUNT(u.id) > 0"; $query = $this->_em->createQuery($dql); $paginator = new Paginator($query); @@ -112,7 +112,7 @@ class PaginationTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testDetectOutputWalker() { // This query works using the output walkers but causes an exception using the TreeWalker - $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g.id HAVING COUNT(u.id) > 0"; + $dql = "SELECT g, COUNT(u.id) AS userCount FROM Doctrine\Tests\Models\CMS\CmsGroup g LEFT JOIN g.users u GROUP BY g HAVING COUNT(u.id) > 0"; $query = $this->_em->createQuery($dql); // If the Paginator detects the custom output walker it should fall back to using the