|
|
@@ -65,6 +65,7 @@ use RuntimeException;
|
|
|
* with the first rows of the query and each of the items, then the second rows and so on.
|
|
|
* @method \Cake\Collection\CollectionInterface chunk($size) Groups the results in arrays of $size rows each.
|
|
|
* @method bool isEmpty() Returns true if this query found no results.
|
|
|
+ * @mixin \Cake\Datasource\QueryTrait
|
|
|
*/
|
|
|
class Query extends DatabaseQuery implements JsonSerializable, QueryInterface
|
|
|
{
|
|
|
@@ -423,7 +424,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface
|
|
|
* Used to recursively add contained association column types to
|
|
|
* the query.
|
|
|
*
|
|
|
- * @param \Cake\ORM\Table $table The table instance to pluck associations from.
|
|
|
+ * @param \Cake\Datasource\RepositoryInterface $table The table instance to pluck associations from.
|
|
|
* @param \Cake\Database\TypeMap $typeMap The typemap to check for columns in.
|
|
|
* This typemap is indirectly mutated via Cake\ORM\Query::addDefaultTypes()
|
|
|
* @param array $associations The nested tree of associations to walk.
|
|
|
@@ -432,6 +433,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface
|
|
|
protected function _addAssociationsToTypeMap($table, $typeMap, $associations)
|
|
|
{
|
|
|
foreach ($associations as $name => $nested) {
|
|
|
+ /* @var \Cake\ORM\Table $table */
|
|
|
$association = $table->association($name);
|
|
|
if (!$association) {
|
|
|
continue;
|
|
|
@@ -998,6 +1000,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface
|
|
|
if (!$this->_beforeFindFired && $this->_type === 'select') {
|
|
|
$table = $this->repository();
|
|
|
$this->_beforeFindFired = true;
|
|
|
+ /* @var \Cake\Event\EventDispatcherInterface $table */
|
|
|
$table->dispatchEvent('Model.beforeFind', [
|
|
|
$this,
|
|
|
new ArrayObject($this->_options),
|