-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
pagination not work with groupBy #335
Comments
Please provide an example |
$qb = $this->connection->createQueryBuilder() |
Well, I know myself what a groupBy is, merely showing a query doesn't help too much to understand the problem. |
Hha, looks like my problem |
As commented in the related PR #333, the Someone else has had the same issue with other paginators, see this doctrine/dbal#6371 Tagging @W0rma as the original proposer for the PR linked above |
Please check if the proposed fix works for you (I tried it myself and it works for me): execute "repositories": [
{
"type": "vcs",
"url": "https://github.com/garak/knp-components.git"
}
], manually edit your <service id="knp_paginator" class="Knp\Component\Pager\Paginator" public="true" lazy="true">
<argument type="service" id="event_dispatcher" />
<argument type="service" id="Knp\Component\Pager\ArgumentAccess\ArgumentAccessInterface" />
<argument type="service" id="database_connection" on-invalid="null" /> <!-- this is the new line -->
<tag name="proxy" interface="Knp\Component\Pager\PaginatorInterface" />
</service> run |
Yes!!! |
You are awesome! it work! thanks! |
@garak When will the fix be available? |
It's not so straightforward. Beside that, we need a PR to add the new argument to the bundle. |
Ok, added a line to the composer,json for now, waiting for release info. |
Oh.
i've got a error: On local comp all works fine. |
Hi, after remove line
in DBALQueryBuilderSubscriber pagination not work if in queryBuilder use groupBy
The text was updated successfully, but these errors were encountered: