/** * Filter the query by a related LeasingBookingLeads object * * @param LeasingBookingLeads|PropelObjectCollection $leasingBookingLeads 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 filterByLeasingBookingLeads($leasingBookingLeads, $comparison = null) { if ($leasingBookingLeads instanceof LeasingBookingLeads) { return $this->addUsingAlias(LeasingNationalityPeer::ID, $leasingBookingLeads->getNationalityId(), $comparison); } elseif ($leasingBookingLeads instanceof PropelObjectCollection) { return $this->useLeasingBookingLeadsQuery()->filterByPrimaryKeys($leasingBookingLeads->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLeasingBookingLeads() only accepts arguments of type LeasingBookingLeads or PropelCollection'); } }