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