Skip to content

Commit

Permalink
doctrine#1277 DDC-3346 DDC-3531 - moved sqlAliasCounter into the ne…
Browse files Browse the repository at this point in the history
…wly created `CachedPersisterContext`
  • Loading branch information
Ocramius committed Jan 24, 2015
1 parent b9f698c commit 2a7f149
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,6 @@ class BasicEntityPersister implements EntityPersister
*/
private $insertSql;

/**
* The JOIN SQL fragment used to eagerly load all many-to-one and one-to-one
* associations configured as FETCH_EAGER, as well as all inverse one-to-one associations.
*
* @var string
*/
protected $selectJoinSql;

/**
* Counter for creating unique SQL table and column aliases.
*
* @var integer
*/
protected $sqlAliasCounter = 0;

/**
* Map from class names (FQCN) to the corresponding generated SQL table aliases.
*
Expand Down Expand Up @@ -1481,7 +1466,7 @@ protected function getSQLTableAlias($className, $assocName = '')
return $this->sqlTableAliases[$className];
}

$tableAlias = 't' . $this->sqlAliasCounter++;
$tableAlias = 't' . $this->cachedPersisterContexts['noLimits']->sqlAliasCounter++;

$this->sqlTableAliases[$className] = $tableAlias;

Expand Down Expand Up @@ -1925,7 +1910,7 @@ protected function getJoinSQLForJoinColumns($joinColumns)
*/
public function getSQLColumnAlias($columnName)
{
return $this->quoteStrategy->getColumnAlias($columnName, $this->sqlAliasCounter++, $this->platform);
return $this->quoteStrategy->getColumnAlias($columnName, $this->cachedPersisterContexts['noLimits']->sqlAliasCounter++, $this->platform);
}

/**
Expand Down

0 comments on commit 2a7f149

Please sign in to comment.