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