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