DDC-1687: [GH-298] by sandermarechal: Pagination using SQL walkers #2122

Closed
opened 2026-01-22 13:41:39 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 6, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of sandermarechal:

Url: https://github.com/doctrine/doctrine2/pull/298

Message:

A CountSqlWalker and LimitSubquerySqlWalker have been implemented. By
default the Paginator will use these SQL walkers. When a query already
uses custom SQL walkers, the Paginator will fall back to the existing
TreeWalker implementations. Improvements:

  • Support for more complex DQL queries using named mixed results with
    GROUP BY and HAVING. For example:

    SELECT g, u, COUNT(u.id) AS userCount
    FROM Entity\Group g LEFT JOIN g.users u
    GROUP BY g.id
    HAVING userCount > 0

  • Support for entities with composite primary keys in the CountSqlWalker
    and LimitSubquerySqlWalker. Only the WhereInWalker still needs to be
    updated for full composite primary key support. But someone smarter
    than me needs to look at that and figure out how to build a WHERE IN
    query that can select rows based on multiple columns.

Originally created by @doctrinebot on GitHub (Mar 6, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: This issue is created automatically through a Github pull request on behalf of sandermarechal: Url: https://github.com/doctrine/doctrine2/pull/298 Message: A CountSqlWalker and LimitSubquerySqlWalker have been implemented. By default the Paginator will use these SQL walkers. When a query already uses custom SQL walkers, the Paginator will fall back to the existing TreeWalker implementations. Improvements: - Support for more complex DQL queries using named mixed results with GROUP BY and HAVING. For example: SELECT g, u, COUNT(u.id) AS userCount FROM Entity\Group g LEFT JOIN g.users u GROUP BY g.id HAVING userCount > 0 - Support for entities with composite primary keys in the CountSqlWalker and LimitSubquerySqlWalker. Only the WhereInWalker still needs to be updated for full composite primary key support. But someone smarter than me needs to look at that and figure out how to build a WHERE IN query that can select rows based on multiple columns.
admin added the Bug label 2026-01-22 13:41:39 +01:00
admin closed this issue 2026-01-22 13:41:39 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 12, 2012):

Comment created by @beberlei:

Merged for 2.3

@doctrinebot commented on GitHub (Mar 12, 2012): Comment created by @beberlei: Merged for 2.3
Author
Owner

@doctrinebot commented on GitHub (Mar 12, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 12, 2012): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Sep 16, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-298] was closed:
https://github.com/doctrine/common/pull/298

@doctrinebot commented on GitHub (Sep 16, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-298] was closed: https://github.com/doctrine/common/pull/298
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2122