protected function _calculateAssociationMap($query)
    {
        $map = $query->getEagerLoader()->associationsMap($this->_defaultTable);
        $this->_matchingMap = (new Collection($map))
            ->match(['matching' => true])
            ->indexBy('alias')
            ->toArray();

        $this->_containMap = (new Collection(array_reverse($map)))
            ->match(['matching' => false])
            ->indexBy('nestKey')
            ->toArray();
    }
protected function _calculateAssociationMap($query)
    {
        $map = $query->getEagerLoader()->associationsMap($this->_defaultTable);
        $this->_matchingMap = (new Collection($map))
            ->match(['matching' => true])
            ->indexBy('alias')
            ->toArray();

        $this->_containMap = (new Collection(array_reverse($map)))
            ->match(['matching' => false])
            ->indexBy('nestKey')
            ->toArray();
    }
protected function _calculateAssociationMap ( $ query ) { $ map = $ query -> getEagerLoader ( ) -> associationsMap ( $ this -> _defaultTable ) ; $ this -> _matchingMap = ( new Collection ( $ map ) ) -> match ( [ 'matching' => true ] ) -> indexBy ( 'alias' ) -> toArray ( ) ; $ this -> _containMap = ( new Collection ( array_reverse ( $ map ) ) ) -> match ( [ 'matching' => false ] ) -> indexBy ( 'nestKey' ) -> toArray ( ) ; }
Calculates the list of associations that should get eager loaded
when fetching each record

@param \Cake\ORM\Query $query The query from where to derive the associations
@return void
Calculates the list of associations that should get eager loaded when fetching each record