lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
    {
        $property    = $class->getProperty($field);
        $columnAlias = $this->getSQLColumnAlias();
        $sql         = sprintf(
            '%s.%s',
            $this->getSQLTableAlias($property->getTableName(), ($alias === 'r' ? '' : $alias)),
            $this->platform->quoteIdentifier($property->getColumnName())
        );

        $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());

        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
    }
protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
    {
        $property    = $class->getProperty($field);
        $columnAlias = $this->getSQLColumnAlias();
        $sql         = sprintf(
            '%s.%s',
            $this->getSQLTableAlias($property->getTableName(), ($alias === 'r' ? '' : $alias)),
            $this->platform->quoteIdentifier($property->getColumnName())
        );

        $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());

        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
    }
protected function getSelectColumnSQL ( $ field , ClassMetadata $ class , $ alias = 'r' ) { $ property = $ class -> getProperty ( $ field ) ; $ columnAlias = $ this -> getSQLColumnAlias ( ) ; $ sql = sprintf ( '%s.%s' , $ this -> getSQLTableAlias ( $ property -> getTableName ( ) , ( $ alias === 'r' ? '' : $ alias ) ) , $ this -> platform -> quoteIdentifier ( $ property -> getColumnName ( ) ) ) ; $ this -> currentPersisterContext -> rsm -> addFieldResult ( $ alias , $ columnAlias , $ field , $ class -> getClassName ( ) ) ; return $ property -> getType ( ) -> convertToPHPValueSQL ( $ sql , $ this -> platform ) . ' AS ' . $ columnAlias ; }
Gets the SQL snippet of a qualified column name for the given field name.

@param string        $field The field name.
@param ClassMetadata $class The class that declares this field. The table this class is
mapped to must own the column for the given field.
@param string        $alias

@return string
Gets the SQL snippet of a qualified column name for the given field name .