Skip to content

Commit 6cedcd4

Browse files
authored
Merge pull request #126 from MJBGO/master
Corrected distinct option
2 parents d8098bd + 3d7bcdc commit 6cedcd4

File tree

1 file changed

+2
-0
lines changed
  • src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber

1 file changed

+2
-0
lines changed

src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber/UsesPaginator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function items(ItemsEvent $event)
3737
$fetchJoinCollection = true;
3838
if ($event->target->hasHint(self::HINT_FETCH_JOIN_COLLECTION)) {
3939
$fetchJoinCollection = $event->target->getHint(self::HINT_FETCH_JOIN_COLLECTION);
40+
} else if (isset($event->options['distinct'])) {
41+
$fetchJoinCollection = $event->options['distinct'];
4042
}
4143

4244
$paginator = new Paginator($event->target, $fetchJoinCollection);

0 commit comments

Comments
 (0)