Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Pager
-
Labels:None
-
Environment:Ubuntu 9.10,
Apache/MySQL,
Framework: Symfony 1.4
Description
//method returns those categories that have any products, it returns 3 records
public function getCategoriesWithProductsQuery()
//but when i do count() on created pager it returns 8 records (which is equal to categories in my database):
$doctrinePager = $this->getServiceContainer()
->setParameter('doctrine_pager.model', 'ZwCategory')
->getService('doctrine_pager')
>setMaxPerPage($this>maxPerPage)
->setQuery($query)
>setPage(null === $page ? $this>page : $page)
->init();
var_dump(count($doctrinePager));
//pager works, but it "thinks" that there are more pages than in reality. with maxPerPage = 2, it thinks that there are 4 pages, but looking at query result it //should be only 2 pages.