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