@@ -577,4 +577,12 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
"ORDER BY r1_.departureDate ASC"
);
}
publicfunctiontestSubselectInSelect()
{
$this->assertSqlGeneration(
"SELECT u.name, (SELECT COUNT(p.phonenumber) FROM Doctrine\Tests\Models\CMS\CmsPhonenumber p WHERE p.phonenumber = 1234) pcount FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name = 'jon'",
"SELECT c0_.name AS name0, (SELECT COUNT(c1_.phonenumber) AS dctrn__ FROM cms_phonenumbers c1_ WHERE c1_.phonenumber = 1234) AS pcount FROM cms_users c0_ WHERE c0_.name = 'jon'"