1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Micro optimization in SqlWalker.

This commit is contained in:
Guilherme Blanco 2011-10-30 16:22:45 -02:00
parent c246c6b28b
commit d444f0e06b

View file

@ -980,17 +980,13 @@ class SqlWalker implements TreeWalker
$qComp = $this->_queryComponents[$dqlAlias]; $qComp = $this->_queryComponents[$dqlAlias];
$class = $qComp['metadata']; $class = $qComp['metadata'];
if ( ! $selectExpression->fieldIdentificationVariable) { $resultAlias = ( ! $selectExpression->fieldIdentificationVariable)
$resultAlias = $fieldName; ? $fieldName
} else { : $selectExpression->fieldIdentificationVariable;
$resultAlias = $selectExpression->fieldIdentificationVariable;
}
if ($class->isInheritanceTypeJoined()) { $tableName = ($class->isInheritanceTypeJoined())
$tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName); ? $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName)
} else { : $class->getTableName();
$tableName = $class->getTableName();
}
$sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias); $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);
$columnName = $class->getQuotedColumnName($fieldName, $this->_platform); $columnName = $class->getQuotedColumnName($fieldName, $this->_platform);