示例#1
0
 public function getReportAnswersJoinUser($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseReportAnswerPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collReportAnswers === null) {
         if ($this->isNew()) {
             $this->collReportAnswers = array();
         } else {
             $criteria->add(ReportAnswerPeer::ANSWER_ID, $this->getId());
             $this->collReportAnswers = ReportAnswerPeer::doSelectJoinUser($criteria, $con);
         }
     } else {
         $criteria->add(ReportAnswerPeer::ANSWER_ID, $this->getId());
         if (!isset($this->lastReportAnswerCriteria) || !$this->lastReportAnswerCriteria->equals($criteria)) {
             $this->collReportAnswers = ReportAnswerPeer::doSelectJoinUser($criteria, $con);
         }
     }
     $this->lastReportAnswerCriteria = $criteria;
     return $this->collReportAnswers;
 }