Closed venimus closed 9 years ago
Seems the problem is in https://github.com/stephpy/timeline/blob/master/src/ResultBuilder/Pager/KnpPager.php#L42
where there should be an option distinct => true
$this->pager = $this->paginator->paginate($target, $page, $limit, array('distinct' => true));
To reproduce create action with 2 components and try to paginate a timeline The paginator Count method will return wrong (bigger) number of results, which will cause the pagination to paginate in more pages than the result set. I tracked the issue to getTimeline method which should not count the results with LEFT JOINS or use DISTINCT.
my code is simple
in most of the actions I have a subject and 2 additional action_components. Doctrine hidrates it properly but count function returns the raw number of results in the query which is actually the number of the action components instead of the actions.