/** * Declares an association between this object and a Especialidad object. * * @param Especialidad $v * @return Medicoespecialidad The current object (for fluent API support) * @throws PropelException */ public function setEspecialidad(Especialidad $v = null) { if ($v === null) { $this->setIdespecialidad(NULL); } else { $this->setIdespecialidad($v->getIdespecialidad()); } $this->aEspecialidad = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Especialidad object, it will not be re-added. if ($v !== null) { $v->addMedicoespecialidad($this); } return $this; }