예제 #1
0
 /**
  * Filter the query by a related Cita object
  *
  * @param   Cita|PropelObjectCollection $cita  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 PacienteQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByCita($cita, $comparison = null)
 {
     if ($cita instanceof Cita) {
         return $this->addUsingAlias(PacientePeer::IDPACIENTE, $cita->getIdpaciente(), $comparison);
     } elseif ($cita instanceof PropelObjectCollection) {
         return $this->useCitaQuery()->filterByPrimaryKeys($cita->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCita() only accepts arguments of type Cita or PropelCollection');
     }
 }