Example #1
0
	/**
	 * Filter the query by a related Eleve object
	 *
	 * @param     Eleve $eleve  the related object to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    MefQuery The current query, for fluid interface
	 */
	public function filterByEleve($eleve, $comparison = null)
	{
		if ($eleve instanceof Eleve) {
			return $this
				->addUsingAlias(MefPeer::MEF_CODE, $eleve->getMefCode(), $comparison);
		} elseif ($eleve instanceof PropelCollection) {
			return $this
				->useEleveQuery()
				->filterByPrimaryKeys($eleve->getPrimaryKeys())
				->endUse();
		} else {
			throw new PropelException('filterByEleve() only accepts arguments of type Eleve or PropelCollection');
		}
	}