original_string: protected function _transformQuery()
      {
          if (!$this->_dirty || $this->_type !== 'select') {
              return;
          }
  
          /** @var \Cake\ORM\Table $repository */
          $repository = $this->getRepository();
  
          if (empty($this->_parts['from'])) {
              $this->from([$repository->getAlias() => $repository->getTable()]);
          }
          $this->_addDefaultFields();
          $this->getEagerLoader()->attachAssociations($this, $repository, !$this->_hasFields);
          $this->_addDefaultSelectTypes();
      }
code: protected function _transformQuery()
      {
          if (!$this->_dirty || $this->_type !== 'select') {
              return;
          }
  
          /** @var \Cake\ORM\Table $repository */
          $repository = $this->getRepository();
  
          if (empty($this->_parts['from'])) {
              $this->from([$repository->getAlias() => $repository->getTable()]);
          }
          $this->_addDefaultFields();
          $this->getEagerLoader()->attachAssociations($this, $repository, !$this->_hasFields);
          $this->_addDefaultSelectTypes();
      }
code_tokens: protected function _transformQuery ( ) { if ( ! $ this -> _dirty || $ this -> _type !== 'select' ) { return ; } /** @var \Cake\ORM\Table $repository */ $ repository = $ this -> getRepository ( ) ; if ( empty ( $ this -> _parts [ 'from' ] ) ) { $ this -> from ( [ $ repository -> getAlias ( ) => $ repository -> getTable ( ) ] ) ; } $ this -> _addDefaultFields ( ) ; $ this -> getEagerLoader ( ) -> attachAssociations ( $ this , $ repository , ! $ this -> _hasFields ) ; $ this -> _addDefaultSelectTypes ( ) ; }
docstring: Applies some defaults to the query object before it is executed.
  
  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 \Cake\Database\Query::execute()
  @return void
docstring_tokens: Applies some defaults to the query object before it is executed .