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