Trait CommonQueryTrait
Trait with common methods used by all ORM query classes.
Property Summary
- 
        $_repository protectedCake\ORM\TableInstance of a repository/table object this query is bound to. 
Method Summary
- 
          addDefaultTypes() publicHints this object to associate the correct types when casting conditions for the database. This is done by extracting the field types from the schema associated to the passed table object. This prevents the user from repeating themselves when specifying conditions. 
- 
          getRepository() publicReturns the default repository object that will be used by this query, that is, the table that will appear in the "from" clause. 
- 
          setRepository() publicSet the default Table object that will be used by this query and form the FROMclause.
Method Detail
addDefaultTypes() ¶ public
addDefaultTypes(Cake\ORM\Table $table): $thisHints this object to associate the correct types when casting conditions for the database. This is done by extracting the field types from the schema associated to the passed table object. This prevents the user from repeating themselves when specifying conditions.
This method returns the same query object for chaining.
Parameters
- 
                Cake\ORM\Table$table
- The table to pull types from 
Returns
$thisgetRepository() ¶ public
getRepository(): Cake\ORM\TableReturns the default repository object that will be used by this query, that is, the table that will appear in the "from" clause.
Returns
Cake\ORM\TablesetRepository() ¶ public
setRepository(Cake\Datasource\RepositoryInterface $repository): $thisSet the default Table object that will be used by this query
and form the FROM clause.
Parameters
- 
                Cake\Datasource\RepositoryInterface$repository
- The default table object to use 
Returns
$thisProperty Detail
$_repository ¶ protected
Instance of a repository/table object this query is bound to.
Type
Cake\ORM\Table