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