Esempio n. 1
0
 public function save($con = null)
 {
     $con = Propel::getConnection();
     try {
         $con->begin();
         $ret = parent::save();
         // update spam_count in answer table
         $answer = $this->getAnswer();
         $answer->setReports($answer->getReports() + 1);
         $answer->save();
         $con->commit();
         return $ret;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Esempio n. 2
0
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ReportAnswerPeer();
     }
     return self::$peer;
 }