protected function doSave(PropelPDO $con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aProvincia !== null) { if ($this->aProvincia->isModified() || $this->aProvincia->isNew()) { $affectedRows += $this->aProvincia->save($con); } $this->setProvincia($this->aProvincia); } if ($this->aTipodocumento !== null) { if ($this->aTipodocumento->isModified() || $this->aTipodocumento->isNew()) { $affectedRows += $this->aTipodocumento->save($con); } $this->setTipodocumento($this->aTipodocumento); } if ($this->aCuenta !== null) { if ($this->aCuenta->isModified() || $this->aCuenta->isNew()) { $affectedRows += $this->aCuenta->save($con); } $this->setCuenta($this->aCuenta); } if ($this->aRolResponsable !== null) { if ($this->aRolResponsable->isModified() || $this->aRolResponsable->isNew()) { $affectedRows += $this->aRolResponsable->save($con); } $this->setRolResponsable($this->aRolResponsable); } if ($this->aNivelInstruccion !== null) { if ($this->aNivelInstruccion->isModified() || $this->aNivelInstruccion->isNew()) { $affectedRows += $this->aNivelInstruccion->save($con); } $this->setNivelInstruccion($this->aNivelInstruccion); } if ($this->isNew()) { $this->modifiedColumns[] = ResponsablePeer::ID; } if ($this->isModified()) { if ($this->isNew()) { $pk = ResponsablePeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += ResponsablePeer::doUpdate($this, $con); } $this->resetModified(); } if ($this->collRelRolresponsableResponsables !== null) { foreach ($this->collRelRolresponsableResponsables as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } $this->alreadyInSave = false; } return $affectedRows; }