1
0
mirror of synced 2025-01-18 06:21:40 +03:00

small refactory

This commit is contained in:
Fabio B. Silva 2012-07-21 18:07:56 -03:00
parent b19e4a6440
commit af2f556fd3
2 changed files with 5 additions and 8 deletions

View File

@ -82,7 +82,7 @@ class SqlWalker implements TreeWalker
* *
* @var integer * @var integer
*/ */
private $newObjectCounter; private $newObjectCounter = 0;
/** /**
* @var ParserResult * @var ParserResult
@ -1411,13 +1411,10 @@ class SqlWalker implements TreeWalker
$resultAlias = $this->scalarResultCounter++; $resultAlias = $this->scalarResultCounter++;
$columnAlias = $this->getSQLColumnAlias('sclr') . $resultAlias; $columnAlias = $this->getSQLColumnAlias('sclr') . $resultAlias;
$resultAliasMap = $this->scalarResultAliasMap;
switch (true) { switch (true) {
case $e instanceof AST\NewObjectExpression: case $e instanceof AST\NewObjectExpression:
$sqlSelectExpressions[] = $e->dispatch($this); $sqlSelectExpressions[] = $e->dispatch($this);
break; break;
default: default:

View File

@ -141,7 +141,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
new Doctrine\Tests\Models\CMS\CmsUserDTO( new Doctrine\Tests\Models\CMS\CmsUserDTO(
u.name, u.name,
e.email, e.email,
new Doctrine\Tests\Models\CMS\CmsUserDTO( new Doctrine\Tests\Models\CMS\CmsAddressDTO(
a.country, a.country,
a.city, a.city,
a.zip a.zip
@ -186,7 +186,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
JOIN JOIN
u.phonenumbers p u.phonenumbers p
GROUP BY GROUP BY
u u, e, a
ORDER BY ORDER BY
u.name"; u.name";