Example #1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aUserGroup !== null) {
             if ($this->aUserGroup->isModified()) {
                 $affectedRows += $this->aUserGroup->save($con);
             }
             $this->setUserGroup($this->aUserGroup);
         }
         if ($this->aJob !== null) {
             if ($this->aJob->isModified() || $this->aJob->getCurrentJobI18n()->isModified()) {
                 $affectedRows += $this->aJob->save($con);
             }
             $this->setJob($this->aJob);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = AclPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += AclPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }