public function saveDocenteHorarioList($con = null) { if (!$this->isValid()) { throw $this->getErrorSchema(); } if (!isset($this->widgetSchema['docente_horario_list'])) { // somebody has unset this widget return; } if (is_null($con)) { $con = $this->getConnection(); } $c = new Criteria(); $c->add(DocenteHorarioPeer::FK_DOCENTE_ID, $this->object->getPrimaryKey()); DocenteHorarioPeer::doDelete($c, $con); $values = $this->getValue('docente_horario_list'); if (is_array($values)) { foreach ($values as $value) { $obj = new DocenteHorario(); $obj->setFkDocenteId($this->object->getPrimaryKey()); $obj->setFkEventoId($value); $obj->save(); } } }
public static function addInstanceToPool(DocenteHorario $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = serialize(array((string) $obj->getFkDocenteId(), (string) $obj->getFkEventoId())); } self::$instances[$key] = $obj; } }