public function getsfSimpleForumTopicViewsJoinsfSimpleForumTopic($criteria = null, $con = null) { include_once 'lib/model/om/BasesfSimpleForumTopicViewPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collsfSimpleForumTopicViews === null) { if ($this->isNew()) { $this->collsfSimpleForumTopicViews = array(); } else { $criteria->add(sfSimpleForumTopicViewPeer::USER_ID, $this->getId()); $this->collsfSimpleForumTopicViews = sfSimpleForumTopicViewPeer::doSelectJoinsfSimpleForumTopic($criteria, $con); } } else { $criteria->add(sfSimpleForumTopicViewPeer::USER_ID, $this->getId()); if (!isset($this->lastsfSimpleForumTopicViewCriteria) || !$this->lastsfSimpleForumTopicViewCriteria->equals($criteria)) { $this->collsfSimpleForumTopicViews = sfSimpleForumTopicViewPeer::doSelectJoinsfSimpleForumTopic($criteria, $con); } } $this->lastsfSimpleForumTopicViewCriteria = $criteria; return $this->collsfSimpleForumTopicViews; }