1
0
mirror of synced 2025-03-21 07:23:55 +03:00

#1277 DDC-3346 DDC-3531 - moved sqlAliasCounter into the newly created CachedPersisterContext

This commit is contained in:
Marco Pivetta 2015-01-22 18:09:30 +01:00
parent b9f698c98c
commit 2a7f149029

View File

@ -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.
*
@ -1481,7 +1466,7 @@ class BasicEntityPersister implements EntityPersister
return $this->sqlTableAliases[$className];
}
$tableAlias = 't' . $this->sqlAliasCounter++;
$tableAlias = 't' . $this->cachedPersisterContexts['noLimits']->sqlAliasCounter++;
$this->sqlTableAliases[$className] = $tableAlias;
@ -1925,7 +1910,7 @@ class BasicEntityPersister implements EntityPersister
*/
public function getSQLColumnAlias($columnName)
{
return $this->quoteStrategy->getColumnAlias($columnName, $this->sqlAliasCounter++, $this->platform);
return $this->quoteStrategy->getColumnAlias($columnName, $this->cachedPersisterContexts['noLimits']->sqlAliasCounter++, $this->platform);
}
/**