Adds a field to the result that belongs to an entity or joined entity.
Signature
public function addFieldResult(string
$alias,
[string
$columnName = null,
[string
$fieldName = null,
[string
$declaringClass = null]]] )
Parameters
$alias
—
string
The alias of the root entity or joined entity to which the field belongs.
$columnName
—
string
The name of the column in the SQL result set.
$fieldName
—
string
The name of the field on the declaring class.
$declaringClass
—
string
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.