I'm having a lot of trouble getting the custome join helper class to
work with pager. There is a section dedicated to this topic at the
bottom of this page:
http://trac.symfony-project.com/trac/wiki/ApplyingCustomJoinsUsingHelper
however, following those directions precisely still yields the
following error:

Unable to find path for class "Contact".
stack trace

    * at ()
      in SF_SYMFONY_LIB_DIR/addon/propel/sfPropelPager.class.php line
55 ...
              52.     // require the model class (because autoloading
can crash under some conditions)
              53.     if (!$classPath = sfCore::getClassPath($this-
>getClassPeer()))
              54.     {
              55.       throw new sfException(sprintf('Unable to find
path for class "%s".', $this->getClassPeer()));
              56.     }
              57.     require_once($classPath);
              58.     $count = call_user_func(array($this-
>getClassPeer(), $this->getPeerCountMethod()), $cForCount);

This is the code that generates that error:
    $joinHelper = new sfPropelCustomJoinHelper('Contact');
    $joinHelper->addSelectTables('ContactAddress','ContactPhone');
    $joinHelper->setHas('Contact','ContactPhone');
    $joinHelper->setHas('Contact','ContactAddress');

    $pager = new myPropelPager('Contact', 10);
    $pager->setCriteria($c);
    $pager->setPage($this->getRequestParameter('page', 1));
    $pager->setClassPeer($joinHelper);

If I remove the last line: '$pager->setClassPeer($joinHelper);' I
don't get an error which tells me that the Contact class exists. It
seems that custom class created by the helper cannot be found by the
pager, any thoughts?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
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