fix group by with ONLY_FULL_GROUP_BY mode (#1830)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user