public function getSelect() {
        if ($this->fields && $this->fields != '*' && (!(is_string($this->fields) && '*' == $this->fields[0] && 'END) AS `__parentRelationKey`' == substr($this->fields, -29)))) {
            if (is_string($this->fields)) {
                return $this->fields;
            }
            $columns = array();
            foreach ($this->fields as $field) { // @TODO: column generation here.
                $columns[] = trim($field);
            }
            return implode(', ', $columns);
        }
        if ((is_string($this->fields) && '*' == $this->fields[0] && 'END) AS `__parentRelationKey`' == substr($this->fields, -29))){
            return implode(', ', $this->getAllColumnsForSelect()) . substr($this->fields, 1);
        } else {
            return implode(', ', $this->getAllColumnsForSelect());
        }
    }
public function getSelect() {
        if ($this->fields && $this->fields != '*' && (!(is_string($this->fields) && '*' == $this->fields[0] && 'END) AS `__parentRelationKey`' == substr($this->fields, -29)))) {
            if (is_string($this->fields)) {
                return $this->fields;
            }
            $columns = array();
            foreach ($this->fields as $field) { // @TODO: column generation here.
                $columns[] = trim($field);
            }
            return implode(', ', $columns);
        }
        if ((is_string($this->fields) && '*' == $this->fields[0] && 'END) AS `__parentRelationKey`' == substr($this->fields, -29))){
            return implode(', ', $this->getAllColumnsForSelect()) . substr($this->fields, 1);
        } else {
            return implode(', ', $this->getAllColumnsForSelect());
        }
    }
public function getSelect ( ) { if ( $ this -> fields && $ this -> fields != '*' && ( ! ( is_string ( $ this -> fields ) && '*' == $ this -> fields [ 0 ] && 'END) AS `__parentRelationKey`' == substr ( $ this -> fields , - 29 ) ) ) ) { if ( is_string ( $ this -> fields ) ) { return $ this -> fields ; } $ columns = array ( ) ; foreach ( $ this -> fields as $ field ) { // @TODO: column generation here. $ columns [ ] = trim ( $ field ) ; } return implode ( ', ' , $ columns ) ; } if ( ( is_string ( $ this -> fields ) && '*' == $ this -> fields [ 0 ] && 'END) AS `__parentRelationKey`' == substr ( $ this -> fields , - 29 ) ) ) { return implode ( ', ' , $ this -> getAllColumnsForSelect ( ) ) . substr ( $ this -> fields , 1 ) ; } else { return implode ( ', ' , $ this -> getAllColumnsForSelect ( ) ) ; } }
Get fields for select; If model is set then the fields are processed so
that it will return the data in a way that can be used to generate the models.
@return string
Get fields for select ; If model is set then the fields are processed so that it will return the data in a way that can be used to generate the models .