/** * Filter the query by a related LeasingEventLeads object * * @param LeasingEventLeads|PropelObjectCollection $leasingEventLeads the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LeasingNationalityQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByLeasingEventLeads($leasingEventLeads, $comparison = null) { if ($leasingEventLeads instanceof LeasingEventLeads) { return $this->addUsingAlias(LeasingNationalityPeer::ID, $leasingEventLeads->getNationalityId(), $comparison); } elseif ($leasingEventLeads instanceof PropelObjectCollection) { return $this->useLeasingEventLeadsQuery()->filterByPrimaryKeys($leasingEventLeads->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLeasingEventLeads() only accepts arguments of type LeasingEventLeads or PropelCollection'); } }