Cake\ORM\Query::_transformQuery PHP Method

_transformQuery() protected method

Specifically add the FROM clause, adds default table fields if none are specified and applies the joins required to eager load associations defined using contain It also sets the default types for the columns in the select clause
See also: Cake\Database\Query::execute()
protected _transformQuery ( ) : void
return void
    protected function _transformQuery()
    {
        if (!$this->_dirty || $this->_type !== 'select') {
            return;
        }
        if (empty($this->_parts['from'])) {
            $this->from([$this->_repository->alias() => $this->_repository->table()]);
        }
        $this->_addDefaultFields();
        $this->eagerLoader()->attachAssociations($this, $this->_repository, !$this->_hasFields);
        $this->_addDefaultSelectTypes();
    }