public function getNbComments() { if ($this->nbComments === null) { $c = new Criteria(); $c->addJoin(sfSimpleBlogPostPeer::ID, sfSimpleBlogCommentPeer::SF_BLOG_POST_ID); $c->add(sfSimpleBlogCommentPeer::IS_MODERATED, false); $this->nbComments = parent::countsfSimpleBlogComments($c); } return $this->nbComments; }