small refacory on AbstractEntityInheritancePersister
This commit is contained in:
parent
e6f08f0b92
commit
7e348b7815
@ -60,14 +60,17 @@ abstract class AbstractEntityInheritancePersister extends BasicEntityPersister
|
|||||||
*/
|
*/
|
||||||
protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
|
protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
|
||||||
{
|
{
|
||||||
$columnName = $class->columnNames[$field];
|
$tableAlias = $alias == 'r' ? '' : $alias;
|
||||||
$sql = $this->getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias) . '.' . $this->quoteStrategy->getColumnName($field, $class, $this->platform);
|
$columnName = $class->columnNames[$field];
|
||||||
$columnAlias = $this->getSQLColumnAlias($columnName);
|
$columnAlias = $this->getSQLColumnAlias($columnName);
|
||||||
|
$sql = $this->getSQLTableAlias($class->name, $tableAlias) . '.'
|
||||||
|
. $this->quoteStrategy->getColumnName($field, $class, $this->platform);
|
||||||
|
|
||||||
$this->rsm->addFieldResult($alias, $columnAlias, $field, $class->name);
|
$this->rsm->addFieldResult($alias, $columnAlias, $field, $class->name);
|
||||||
|
|
||||||
if (isset($class->fieldMappings[$field]['requireSQLConversion'])) {
|
if (isset($class->fieldMappings[$field]['requireSQLConversion'])) {
|
||||||
$type = Type::getType($class->getTypeOfField($field));
|
$type = Type::getType($class->getTypeOfField($field));
|
||||||
$sql = $type->convertToPHPValueSQL($sql, $this->platform);
|
$sql = $type->convertToPHPValueSQL($sql, $this->platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sql . ' AS ' . $columnAlias;
|
return $sql . ' AS ' . $columnAlias;
|
||||||
|
Loading…
Reference in New Issue
Block a user