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