#1277 DDC-3346 DDC-3531 - moved selectColumnListSql
into the newly created CachedPersisterContext
This commit is contained in:
parent
4c62d3bfda
commit
55930a3402
@ -1187,8 +1187,8 @@ class BasicEntityPersister implements EntityPersister
|
|||||||
protected function getSelectColumnsSQL(/*$hasLimitClause = false*/)
|
protected function getSelectColumnsSQL(/*$hasLimitClause = false*/)
|
||||||
{
|
{
|
||||||
//if ( ! $hasLimitClause && $this->selectColumnListSql !== null) {
|
//if ( ! $hasLimitClause && $this->selectColumnListSql !== null) {
|
||||||
if ($this->selectColumnListSql !== null) {
|
if ($this->cachedPersisterContexts['noLimits']->selectColumnListSql !== null) {
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
$columnList = array();
|
$columnList = array();
|
||||||
@ -1288,9 +1288,9 @@ class BasicEntityPersister implements EntityPersister
|
|||||||
$this->selectJoinSql .= implode(' AND ', $joinCondition);
|
$this->selectJoinSql .= implode(' AND ', $joinCondition);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->selectColumnListSql = implode(', ', $columnList);
|
$this->cachedPersisterContexts['noLimits']->selectColumnListSql = implode(', ', $columnList);
|
||||||
|
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,40 +48,11 @@ class CachedPersisterContext
|
|||||||
*/
|
*/
|
||||||
public $rsm;
|
public $rsm;
|
||||||
|
|
||||||
/**
|
|
||||||
* The map of column names to DBAL mapping types of all prepared columns used
|
|
||||||
* when INSERTing or UPDATEing an entity.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*
|
|
||||||
* @see \Doctrine\ORM\Persisters\Entity\BasicEntityPersister#prepareInsertData($entity)
|
|
||||||
* @see \Doctrine\ORM\Persisters\Entity\BasicEntityPersister#prepareUpdateData($entity)
|
|
||||||
*/
|
|
||||||
public $columnTypes = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The map of quoted column names.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*
|
|
||||||
* @see \Doctrine\ORM\Persisters\Entity\BasicEntityPersister#prepareInsertData($entity)
|
|
||||||
* @see \Doctrine\ORM\Persisters\Entity\BasicEntityPersister#prepareUpdateData($entity)
|
|
||||||
*/
|
|
||||||
public $quotedColumns = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The INSERT SQL statement used for entities handled by this persister.
|
|
||||||
* This SQL is only generated once per request, if at all.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $insertSql = '';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SELECT column list SQL fragment used for querying entities by this persister.
|
* The SELECT column list SQL fragment used for querying entities by this persister.
|
||||||
* This SQL fragment is only generated once per request, if at all.
|
* This SQL fragment is only generated once per request, if at all.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string|null
|
||||||
*/
|
*/
|
||||||
public $selectColumnListSql;
|
public $selectColumnListSql;
|
||||||
|
|
||||||
|
@ -420,8 +420,8 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
|
|||||||
protected function getSelectColumnsSQL()
|
protected function getSelectColumnsSQL()
|
||||||
{
|
{
|
||||||
// Create the column list fragment only once
|
// Create the column list fragment only once
|
||||||
if ($this->selectColumnListSql !== null) {
|
if ($this->cachedPersisterContexts['noLimits']->selectColumnListSql !== null) {
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
$columnList = array();
|
$columnList = array();
|
||||||
@ -523,9 +523,9 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->selectColumnListSql = implode(', ', $columnList);
|
$this->cachedPersisterContexts['noLimits']->selectColumnListSql = implode(', ', $columnList);
|
||||||
|
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,8 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
|
|||||||
*/
|
*/
|
||||||
protected function getSelectColumnsSQL()
|
protected function getSelectColumnsSQL()
|
||||||
{
|
{
|
||||||
if ($this->selectColumnListSql !== null) {
|
if ($this->cachedPersisterContexts['noLimits']->selectColumnListSql !== null) {
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
$columnList[] = parent::getSelectColumnsSQL();
|
$columnList[] = parent::getSelectColumnsSQL();
|
||||||
@ -106,9 +106,9 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->selectColumnListSql = implode(', ', $columnList);
|
$this->cachedPersisterContexts['noLimits']->selectColumnListSql = implode(', ', $columnList);
|
||||||
|
|
||||||
return $this->selectColumnListSql;
|
return $this->cachedPersisterContexts['noLimits']->selectColumnListSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user