protected function doSave(PropelPDO $con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->isNew()) { $this->modifiedColumns[] = EventoPeer::ID; } if ($this->isModified()) { if ($this->isNew()) { $pk = EventoPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += EventoPeer::doUpdate($this, $con); } $this->resetModified(); } if ($this->collRelDivisionActividadDocentes !== null) { foreach ($this->collRelDivisionActividadDocentes as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } if ($this->collDocenteHorarios !== null) { foreach ($this->collDocenteHorarios as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } if ($this->collHorarioescolars !== null) { foreach ($this->collHorarioescolars as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } $this->alreadyInSave = false; } return $affectedRows; }