From ebdfab8f2cfd38948f5cfbe196d7b15cdf8d4048 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 22 Jan 2015 18:10:43 +0100 Subject: [PATCH] #1277 DDC-3346 DDC-3531 - moved `sqlTableAliases` into the newly created `CachedPersisterContext` --- .../ORM/Persisters/Entity/BasicEntityPersister.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php index 4df64bbd8..24bafa550 100644 --- a/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php @@ -163,13 +163,6 @@ class BasicEntityPersister implements EntityPersister */ private $insertSql; - /** - * Map from class names (FQCN) to the corresponding generated SQL table aliases. - * - * @var array - */ - protected $sqlTableAliases = array(); - /** * The quote strategy. * @@ -1462,13 +1455,13 @@ class BasicEntityPersister implements EntityPersister $className .= '#' . $assocName; } - if (isset($this->sqlTableAliases[$className])) { - return $this->sqlTableAliases[$className]; + if (isset($this->cachedPersisterContexts['noLimits']->sqlTableAliases[$className])) { + return $this->cachedPersisterContexts['noLimits']->sqlTableAliases[$className]; } $tableAlias = 't' . $this->cachedPersisterContexts['noLimits']->sqlAliasCounter++; - $this->sqlTableAliases[$className] = $tableAlias; + $this->cachedPersisterContexts['noLimits']->sqlTableAliases[$className] = $tableAlias; return $tableAlias; }