fix group by with ONLY_FULL_GROUP_BY mode (#1830)

This commit is contained in:
Kevin Papst
2020-07-18 10:16:15 +02:00
committed by GitHub
parent 7907b43ef7
commit 93a23f3fa3
4 changed files with 28 additions and 23 deletions

View File

@@ -141,8 +141,10 @@ class InvoiceRepository extends EntityRepository
// this will make sure, that we do not accidentally create results with multiple rows
// => which would result in a wrong LIMIT / pagination results
// $qb->addGroupBy('i.id');
// the second group by is needed due to SQL standard (even though logically not really required for this query)
$qb->addGroupBy('i.id')->addGroupBy($orderBy);
// $qb->addGroupBy($orderBy);
return $qb;
}