public function delete(Doctrine_Connection $conn = null, $latestPost = null)
 {
     if (!$con) {
         $con = Doctrine_Manager::connection();
     }
     try {
         $con->beginTransaction();
         parent::delete($con);
         // Update the topic's forum counts
         $forum = $this->getsfSimpleForumForum();
         if (!$latestPost) {
             $latestPost = $forum->getLatestPostByQuery();
         }
         $forum->updateCounts($latestPost, $con);
         $con->commit();
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new sfSimpleForumTopicPeer();
     }
     return self::$peer;
 }