public function endUse()
    {
        if (isset($this->aliases[$this->modelAlias])) {
            $this->removeAlias($this->modelAlias);
        }

        $primaryCriteria = $this->getPrimaryCriteria();
        $primaryCriteria->mergeWith($this);

        return $primaryCriteria;
    }
public function endUse()
    {
        if (isset($this->aliases[$this->modelAlias])) {
            $this->removeAlias($this->modelAlias);
        }

        $primaryCriteria = $this->getPrimaryCriteria();
        $primaryCriteria->mergeWith($this);

        return $primaryCriteria;
    }
public function endUse ( ) { if ( isset ( $ this -> aliases [ $ this -> modelAlias ] ) ) { $ this -> removeAlias ( $ this -> modelAlias ) ; } $ primaryCriteria = $ this -> getPrimaryCriteria ( ) ; $ primaryCriteria -> mergeWith ( $ this ) ; return $ primaryCriteria ; }
Finalizes a secondary criteria and merges it with its primary Criteria

@see Criteria::mergeWith()

@return ModelCriteria The primary criteria object
Finalizes a secondary criteria and merges it with its primary Criteria