protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aCollaboration !== null) { if ($this->aCollaboration->isModified()) { $affectedRows += $this->aCollaboration->save($con); } $this->setCollaboration($this->aCollaboration); } if ($this->aOrganization !== null) { if ($this->aOrganization->isModified()) { $affectedRows += $this->aOrganization->save($con); } $this->setOrganization($this->aOrganization); } if ($this->isModified()) { if ($this->isNew()) { $pk = CollaboratingOrganizationPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += CollaboratingOrganizationPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }