private function setQueryField($meta, $value, $alias)
    {
        $campo = $this->getFullFieldName($value, $alias);

        if ($meta->isSingleValuedAssociation($value) && $value != $alias) {
            $targetField = $meta->getAssociationMapping($value)['joinColumns'][0]['referencedColumnName'];
            $alias = $alias == self::DEFAULT_TABLE_ALIAS ? substr($campo, strpos($campo, '.') + 1) : $alias.'_'.$targetField;
            $campo = 'IDENTITY('.$campo.') '.$alias;
        } elseif ($this->position > 0) {
            $campo = '('.$campo.') AS '.$alias.'_'.$value;
        }
        // acrescenta o campo ao select
        $this->queryFields[] = $campo;
    }
private function setQueryField($meta, $value, $alias)
    {
        $campo = $this->getFullFieldName($value, $alias);

        if ($meta->isSingleValuedAssociation($value) && $value != $alias) {
            $targetField = $meta->getAssociationMapping($value)['joinColumns'][0]['referencedColumnName'];
            $alias = $alias == self::DEFAULT_TABLE_ALIAS ? substr($campo, strpos($campo, '.') + 1) : $alias.'_'.$targetField;
            $campo = 'IDENTITY('.$campo.') '.$alias;
        } elseif ($this->position > 0) {
            $campo = '('.$campo.') AS '.$alias.'_'.$value;
        }
        // acrescenta o campo ao select
        $this->queryFields[] = $campo;
    }
private function setQueryField ( $ meta , $ value , $ alias ) { $ campo = $ this -> getFullFieldName ( $ value , $ alias ) ; if ( $ meta -> isSingleValuedAssociation ( $ value ) && $ value != $ alias ) { $ targetField = $ meta -> getAssociationMapping ( $ value ) [ 'joinColumns' ] [ 0 ] [ 'referencedColumnName' ] ; $ alias = $ alias == self :: DEFAULT_TABLE_ALIAS ? substr ( $ campo , strpos ( $ campo , '.' ) + 1 ) : $ alias . '_' . $ targetField ; $ campo = 'IDENTITY(' . $ campo . ') ' . $ alias ; } elseif ( $ this -> position > 0 ) { $ campo = '(' . $ campo . ') AS ' . $ alias . '_' . $ value ; } // acrescenta o campo ao select $ this -> queryFields [ ] = $ campo ; }
Add the field in the select field list.

@param $meta
@param $value
@param $alias
Add the field in the select field list .