Hi everyone. I'm traing to do a List Pagination but get this fatal
error:

"Fatal error: Call to undefined method Doctrine_Collection::offset()
in /home/rosb/sfprojects/taurus_v01/lib/vendor/symfony/lib/plugins/
sfDoctrinePlugin/lib/pager/sfDoctrinePager.class.php on line 84"

I have this code in my actions.class:

1.-    $this->lote = $this->getRoute()->getObject();
2.-    $this->pager = new sfDoctrinePager(
3.-      'TaurusAnimales',
4.-       sfConfig::get('app_max_animal_on_lotes')
5.-       );
6.-    $this->pager->setQuery($this->lote->getAnimalesPorLoteQuery());
7.-    $this->pager->setPage($request->getParameter('page', 1));
8.-    $this->pager->init();

My method "getAnimalesPorLoteQuery()" give me all items from my model
TaurusAnimales, if i do an (echo $this->query) on
sfDoctrinePager.class.php  method setQuery() i got this:

Doctrine_Collection
data : Array(
    0 : Object(TaurusAnimales)
    1 : Object(TaurusAnimales)
    2 : Object(TaurusAnimales)
    3 : Object(TaurusAnimales)
    4 : Object(TaurusAnimales)
    5 : Object(TaurusAnimales)
    6 : Object(TaurusAnimales)
    7 : Object(TaurusAnimales)
    8 : Object(TaurusAnimales)
    9 : Object(TaurusAnimales)
    10 : Object(TaurusAnimales)
)
So, getAnimalesPorLoteQuery() method works fine.

I'm using symfony 1.3.0-BETA1, also i have used the same symfony
source por jobeet List Pagination and everything goes fine.

--

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].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=.


Reply via email to