/** * Filter the query by a related Adresse object * * @param Adresse|PropelCollection $adresse The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return AbsenceEleveNotificationQuery The current query, for fluid interface */ public function filterByAdresse($adresse, $comparison = null) { if ($adresse instanceof Adresse) { return $this ->addUsingAlias(AbsenceEleveNotificationPeer::ADR_ID, $adresse->getId(), $comparison); } elseif ($adresse instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(AbsenceEleveNotificationPeer::ADR_ID, $adresse->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByAdresse() only accepts arguments of type Adresse or PropelCollection'); } }