Hi to all!

I've followed Day 7 accordingly and when I'm now trying to view the
result of Day 7 (category show)... I received this error...

Fatal error: Call to undefined method
Doctrine_Collection::getActiveJobsQuery() in C:\xampp\htdocs\jobeet
\apps\frontend\modules\category\actions\actions.class.php on line 28

Here is my category action:
class categoryActions extends sfActions
{
        public function executeIndex(sfWebRequest $request)
        {
         $this->forward('default', 'module');
        }

        public function executeShow(sfWebRequest $request)
        {
          $this->category = $this->getRoute()->getObject();

          $this->pager = new sfDoctrinePager('JobeetJob',sfConfig::get
('app_max_jobs_on_category'));
          $this->pager->setQuery($this->category->getActiveJobsQuery());
          $this->pager->setPage($request->getParameter('page', 1));
          $this->pager->init();
        }
}

Below is my JobeetCategory.class.php
class JobeetCategory extends BaseJobeetCategory
{
        public function getSlug()
        {
          return Jobeet::slugify($this->getName());
        }

        public function getActiveJobsQuery()
        {
          $q = Doctrine_Query::create()
                ->from('JobeetJob j')
                ->where('j.category_id = ?', $this->getId());

          return Doctrine::getTable('JobeetJob')->addActiveJobsQuery($q);
        }

        public function getActiveJobs($max = 10)
        {
          $q = $this->getActiveJobsQuery()
                ->limit($max);

          return $q->execute();
        }

        public function countActiveJobs()
        {
          return $this->getActiveJobsQuery()->count();
        }
}

I tried repeating Day 7 and it is still the same? Can you tell me
what's the problem here? Please, I'm trying to learn symfony. Thanks
in advance :)

- Jairah

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to