lib/Doctrine/ORM/Query/ResultSetMapping.php
public function addFieldResult($alias, $columnName, $fieldName, $declaringClass = null)
    {
        // column name (in result set) => field name
        $this->fieldMappings[$columnName] = $fieldName;
        // column name => alias of owner
        $this->columnOwnerMap[$columnName] = $alias;
        // field name => class name of declaring class
        $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias];

        if (! $this->isMixed && $this->scalarMappings) {
            $this->isMixed = true;
        }

        return $this;
    }
public function addFieldResult($alias, $columnName, $fieldName, $declaringClass = null)
    {
        // column name (in result set) => field name
        $this->fieldMappings[$columnName] = $fieldName;
        // column name => alias of owner
        $this->columnOwnerMap[$columnName] = $alias;
        // field name => class name of declaring class
        $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias];

        if (! $this->isMixed && $this->scalarMappings) {
            $this->isMixed = true;
        }

        return $this;
    }
public function addFieldResult ( $ alias , $ columnName , $ fieldName , $ declaringClass = null ) { // column name (in result set) => field name $ this -> fieldMappings [ $ columnName ] = $ fieldName ; // column name => alias of owner $ this -> columnOwnerMap [ $ columnName ] = $ alias ; // field name => class name of declaring class $ this -> declaringClasses [ $ columnName ] = $ declaringClass ? : $ this -> aliasMap [ $ alias ] ; if ( ! $ this -> isMixed && $ this -> scalarMappings ) { $ this -> isMixed = true ; } return $ this ; }
Adds a field to the result that belongs to an entity or joined entity.

@param string      $alias          The alias of the root entity or joined entity to which the field belongs.
@param string      $columnName     The name of the column in the SQL result set.
@param string      $fieldName      The name of the field on the declaring class.
@param string|null $declaringClass The name of the class that declares/owns the specified field.
When $alias refers to a superclass in a mapped hierarchy but
the field $fieldName is defined on a subclass, specify that here.
If not specified, the field is assumed to belong to the class
designated by $alias.

@return ResultSetMapping This ResultSetMapping instance.

@todo Rename: addField
Adds a field to the result that belongs to an entity or joined entity .