protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aCatalog !== null) { if ($this->aCatalog->isModified()) { $affectedRows += $this->aCatalog->save($con); } $this->setCatalog($this->aCatalog); } if ($this->aDepartment !== null) { if ($this->aDepartment->isModified()) { $affectedRows += $this->aDepartment->save($con); } $this->setDepartment($this->aDepartment); } if ($this->aColLocation !== null) { if ($this->aColLocation->isModified()) { $affectedRows += $this->aColLocation->save($con); } $this->setColLocation($this->aColLocation); } if ($this->aColSource !== null) { if ($this->aColSource->isModified()) { $affectedRows += $this->aColSource->save($con); } $this->setColSource($this->aColSource); } if ($this->isModified()) { if ($this->isNew()) { $pk = VCatalogPerSourcePeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += VCatalogPerSourcePeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }