/** * Filter the query by a related Especialidad object * * @param Especialidad|PropelObjectCollection $especialidad The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MedicoQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByEspecialidad($especialidad, $comparison = null) { if ($especialidad instanceof Especialidad) { return $this->addUsingAlias(MedicoPeer::IDESPECIALIDAD, $especialidad->getIdespecialidad(), $comparison); } elseif ($especialidad instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(MedicoPeer::IDESPECIALIDAD, $especialidad->toKeyValue('PrimaryKey', 'Idespecialidad'), $comparison); } else { throw new PropelException('filterByEspecialidad() only accepts arguments of type Especialidad or PropelCollection'); } }
/** * Filter the query by a related Medicoespecialidad object * * @param Medicoespecialidad|PropelObjectCollection $medicoespecialidad the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return EspecialidadQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByMedicoespecialidad($medicoespecialidad, $comparison = null) { if ($medicoespecialidad instanceof Medicoespecialidad) { return $this->addUsingAlias(EspecialidadPeer::IDESPECIALIDAD, $medicoespecialidad->getIdespecialidad(), $comparison); } elseif ($medicoespecialidad instanceof PropelObjectCollection) { return $this->useMedicoespecialidadQuery()->filterByPrimaryKeys($medicoespecialidad->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByMedicoespecialidad() only accepts arguments of type Medicoespecialidad or PropelCollection'); } }