protected function _correctStrategy($loadable)
    {
        $config = $loadable->getConfig();
        $currentStrategy = isset($config['strategy']) ?
            $config['strategy'] :
            'join';

        if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
            return;
        }

        $config['strategy'] = Association::STRATEGY_SELECT;
        $loadable->setConfig($config);
        $loadable->setCanBeJoined(false);
    }
protected function _correctStrategy($loadable)
    {
        $config = $loadable->getConfig();
        $currentStrategy = isset($config['strategy']) ?
            $config['strategy'] :
            'join';

        if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
            return;
        }

        $config['strategy'] = Association::STRATEGY_SELECT;
        $loadable->setConfig($config);
        $loadable->setCanBeJoined(false);
    }
protected function _correctStrategy ( $ loadable ) { $ config = $ loadable -> getConfig ( ) ; $ currentStrategy = isset ( $ config [ 'strategy' ] ) ? $ config [ 'strategy' ] : 'join' ; if ( ! $ loadable -> canBeJoined ( ) || $ currentStrategy !== 'join' ) { return ; } $ config [ 'strategy' ] = Association :: STRATEGY_SELECT ; $ loadable -> setConfig ( $ config ) ; $ loadable -> setCanBeJoined ( false ) ; }
Changes the association fetching strategy if required because of duplicate
under the same direct associations chain

@param \Cake\ORM\EagerLoadable $loadable The association config
@return void
Changes the association fetching strategy if required because of duplicate under the same direct associations chain