/**
  * (non-PHPdoc)
  * @see ContestDBObject::writeToDB()
  * @return bool
  */
 public function writeToDB()
 {
     $success = parent::writeToDB();
     if ($success) {
         $contestant = new ContestContestant(array('id' => $this->getField('contestant_id')));
         $contestant->updateVotes();
         $contestant->writeToDB();
     }
     return $success;
 }
 /**
  * (non-PHPdoc)
  * @see ContestDBObject::writeToDB()
  * @return bool
  */
 public function writeToDB()
 {
     $success = parent::writeToDB();
     if ($success && $this->wasSetToFinished) {
         $this->doFinishActions();
         $this->wasSetToFinished = false;
     }
     return $success;
 }