Ejemplo n.º 1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aEtime !== null) {
             if ($this->aEtime->isModified()) {
                 $affectedRows += $this->aEtime->save($con);
             }
             $this->setEtime($this->aEtime);
         }
         if ($this->aPersonType !== null) {
             if ($this->aPersonType->isModified()) {
                 $affectedRows += $this->aPersonType->save($con);
             }
             $this->setPersonType($this->aPersonType);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = EtimePeoplePeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += EtimePeoplePeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }