/** * Filter the query by a related Atencion object * * @param Atencion|PropelObjectCollection $atencion 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 filterByAtencion($atencion, $comparison = null) { if ($atencion instanceof Atencion) { return $this->addUsingAlias(AgendaPeer::ATENCION_ID, $atencion->getId(), $comparison); } elseif ($atencion instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(AgendaPeer::ATENCION_ID, $atencion->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByAtencion() only accepts arguments of type Atencion or PropelCollection'); } }