/** * Filter the query by a related Quirofano object * * @param Quirofano|PropelObjectCollection $quirofano The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return AgendaQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByQuirofano($quirofano, $comparison = null) { if ($quirofano instanceof Quirofano) { return $this->addUsingAlias(AgendaPeer::QUIROFANO_ID, $quirofano->getId(), $comparison); } elseif ($quirofano instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(AgendaPeer::QUIROFANO_ID, $quirofano->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByQuirofano() only accepts arguments of type Quirofano or PropelCollection'); } }