protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aClassGroup !== null) { if ($this->aClassGroup->isModified()) { $affectedRows += $this->aClassGroup->save($con); } $this->setClassGroup($this->aClassGroup); } if ($this->aPublicInformationCategory !== null) { if ($this->aPublicInformationCategory->isModified()) { $affectedRows += $this->aPublicInformationCategory->save($con); } $this->setPublicInformationCategory($this->aPublicInformationCategory); } if ($this->aDepartment !== null) { if ($this->aDepartment->isModified()) { $affectedRows += $this->aDepartment->save($con); } $this->setDepartment($this->aDepartment); } if ($this->isModified()) { if ($this->isNew()) { $pk = PublicInformationPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += PublicInformationPeer::doUpdate($this, $con); } $this->resetModified(); } if ($this->collJobInformations !== null) { foreach ($this->collJobInformations as $referrerFK) { if (!$referrerFK->isDeleted()) { $affectedRows += $referrerFK->save($con); } } } $this->alreadyInSave = false; } return $affectedRows; }