public function savePartidoListaList($con = null) { if (!$this->isValid()) { throw $this->getErrorSchema(); } if (!isset($this->widgetSchema['partido_lista_list'])) { // somebody has unset this widget return; } if (null === $con) { $con = $this->getConnection(); } $c = new Criteria(); $c->add(PartidoListaPeer::LISTA_ID, $this->object->getPrimaryKey()); PartidoListaPeer::doDelete($c, $con); $values = $this->getValue('partido_lista_list'); if (is_array($values)) { foreach ($values as $value) { $obj = new PartidoLista(); $obj->setListaId($this->object->getPrimaryKey()); $obj->setPartidoId($value); $obj->save(); } } }