public function useQuery($relationName, $secondaryCriteriaClass = null)
    {
        if (!isset($this->joins[$relationName])) {
            throw new PropelException('Unknown class or alias ' . $relationName);
        }
        $className = $this->joins[$relationName]->getTableMap()->getPhpName();
        if (null === $secondaryCriteriaClass) {
            $secondaryCriteria = PropelQuery::from($className);
        } else {
            $secondaryCriteria = new $secondaryCriteriaClass();
        }
        if ($className != $relationName) {
            $secondaryCriteria->setModelAlias($relationName, $relationName == $this->joins[$relationName]->getRelationMap()->getName() ? false : true);
        }
        $secondaryCriteria->setPrimaryCriteria($this, $this->joins[$relationName]);

        return $secondaryCriteria;
    }
public function useQuery($relationName, $secondaryCriteriaClass = null)
    {
        if (!isset($this->joins[$relationName])) {
            throw new PropelException('Unknown class or alias ' . $relationName);
        }
        $className = $this->joins[$relationName]->getTableMap()->getPhpName();
        if (null === $secondaryCriteriaClass) {
            $secondaryCriteria = PropelQuery::from($className);
        } else {
            $secondaryCriteria = new $secondaryCriteriaClass();
        }
        if ($className != $relationName) {
            $secondaryCriteria->setModelAlias($relationName, $relationName == $this->joins[$relationName]->getRelationMap()->getName() ? false : true);
        }
        $secondaryCriteria->setPrimaryCriteria($this, $this->joins[$relationName]);

        return $secondaryCriteria;
    }
public function useQuery ( $ relationName , $ secondaryCriteriaClass = null ) { if ( ! isset ( $ this -> joins [ $ relationName ] ) ) { throw new PropelException ( 'Unknown class or alias ' . $ relationName ) ; } $ className = $ this -> joins [ $ relationName ] -> getTableMap ( ) -> getPhpName ( ) ; if ( null === $ secondaryCriteriaClass ) { $ secondaryCriteria = PropelQuery :: from ( $ className ) ; } else { $ secondaryCriteria = new $ secondaryCriteriaClass ( ) ; } if ( $ className != $ relationName ) { $ secondaryCriteria -> setModelAlias ( $ relationName , $ relationName == $ this -> joins [ $ relationName ] -> getRelationMap ( ) -> getName ( ) ? false : true ) ; } $ secondaryCriteria -> setPrimaryCriteria ( $ this , $ this -> joins [ $ relationName ] ) ; return $ secondaryCriteria ; }
Initializes a secondary ModelCriteria object, to be later merged with the current object

@see       ModelCriteria::endUse()

@param string $relationName           Relation name or alias
@param string $secondaryCriteriaClass Classname for the ModelCriteria to be used

@return ModelCriteria The secondary criteria object

@throws PropelException
Initializes a secondary ModelCriteria object to be later merged with the current object