protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aColItem !== null) { if ($this->aColItem->isModified()) { $affectedRows += $this->aColItem->save($con); } $this->setColItem($this->aColItem); } if ($this->aMember !== null) { if ($this->aMember->isModified()) { $affectedRows += $this->aMember->save($con); } $this->setMember($this->aMember); } if ($this->aColStatus !== null) { if ($this->aColStatus->isModified()) { $affectedRows += $this->aColStatus->save($con); } $this->setColStatus($this->aColStatus); } if ($this->isModified()) { if ($this->isNew()) { $pk = CirHistoryPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += CirHistoryPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }