Skip to content

Error with search and pagination when using group by #27

@ghost

Description

Recent change introduced in Laravel 7.10.0, and merged from laravel/framework#32624 broke search and pagination functionality when Eloquence is used with group by queries.

Problem with both is that base version of runPaginationCountQuery is changed, and now uses subquery to get count for pagination. This produces multiple rows of aggregates, and the pagination total is returned from first row only.

This can be solved by replacing/removing the method in Sofa\Eloquence\Query\Builder, but then search query gets wrapped in subquery and times out for me, so I couldn't get any further in investigating it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions