petkopara / PetkoparaCrudGeneratorBundle

Symfony3 CRUD generator bundle with pagination, filter, bulk actions and Twitter bootstrap 3.3.6 features.
MIT License
70 stars 17 forks source link

Fix issue with PostgreSQL #53

Closed MatthieuSarter closed 5 years ago

MatthieuSarter commented 6 years ago

This patch fixes the "Grouping error" that occurs on the index page when using PostgreSQL.

This error was due to the fact that when using COUNT and ORDER BY, pgSQL requires all the fields in ORDER BY clause to also appear in GROUP BY clause, so the COUNT request used to get the total number of items must be executed before adding the order parameters to the query builder.

Fixes issue #44