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