APYDataGridBundle
APYDataGridBundle copied to clipboard
Bug between empty result, filters and permanent filters
Hello,
Grid/Source/Entity.php#L658: auto switch select from query to source without applying permanent filters is nonsense when no result.
Then, an unwanted consequence is the explosion in the number of queries with loop on each select filter (L661). We go from 8 (expected - 4 * query + 4 * source) to 20 requests (actual - 4 * query + 4*4 * source) with 4 select filters.
Thanks.
The same for manipulateQuery, is there currently any accepted workaround for this ?
I encountered this issue before and solved it by using the initQueryBuilder() on the source instead of manipulateQuery, but this doubled the columns in the select, which I now solved by adding $qb->resetDQLPart('select');