public function cleanCopy()
    {
        $clone = clone $this;
        $clone->setEagerLoader(clone $this->getEagerLoader());
        $clone->triggerBeforeFind();
        $clone->enableAutoFields(false);
        $clone->limit(null);
        $clone->order([], true);
        $clone->offset(null);
        $clone->mapReduce(null, null, true);
        $clone->formatResults(null, true);
        $clone->setSelectTypeMap(new TypeMap());
        $clone->decorateResults(null, true);

        return $clone;
    }
public function cleanCopy()
    {
        $clone = clone $this;
        $clone->setEagerLoader(clone $this->getEagerLoader());
        $clone->triggerBeforeFind();
        $clone->enableAutoFields(false);
        $clone->limit(null);
        $clone->order([], true);
        $clone->offset(null);
        $clone->mapReduce(null, null, true);
        $clone->formatResults(null, true);
        $clone->setSelectTypeMap(new TypeMap());
        $clone->decorateResults(null, true);

        return $clone;
    }
public function cleanCopy ( ) { $ clone = clone $ this ; $ clone -> setEagerLoader ( clone $ this -> getEagerLoader ( ) ) ; $ clone -> triggerBeforeFind ( ) ; $ clone -> enableAutoFields ( false ) ; $ clone -> limit ( null ) ; $ clone -> order ( [ ] , true ) ; $ clone -> offset ( null ) ; $ clone -> mapReduce ( null , null , true ) ; $ clone -> formatResults ( null , true ) ; $ clone -> setSelectTypeMap ( new TypeMap ( ) ) ; $ clone -> decorateResults ( null , true ) ; return $ clone ; }
Creates a copy of this current query, triggers beforeFind and resets some state.

The following state will be cleared:

- autoFields
- limit
- offset
- map/reduce functions
- result formatters
- order
- containments

This method creates query clones that are useful when working with subqueries.

@return \Cake\ORM\Query
Creates a copy of this current query triggers beforeFind and resets some state .