Beispiel #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->aAudience !== null) {
             if ($this->aAudience->isModified()) {
                 $affectedRows += $this->aAudience->save($con);
             }
             $this->setAudience($this->aAudience);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = EtimeAudiencePeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += EtimeAudiencePeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }