public function save($con = null) { $con = Propel::getConnection(); try { $con->begin(); $ret = parent::save(); // update spam_count in question table $question = $this->getQuestion(); $question->setReports($question->getReports() + 1); $question->save(); $con->commit(); return $ret; } catch (Exception $e) { $con->rollback(); throw $e; } }
public function getPeer() { if (self::$peer === null) { self::$peer = new ReportQuestionPeer(); } return self::$peer; }