Open
Description
I have the following query:
$qb = $em->createQueryBuilder();
$qb->select('de', 'COUNT(de.auftragsnummer) as menge');
$qb->from('App\Entity\DispositionsplanEintrag', 'de');
$qb->where('de.geloescht IS NULL');
$qb->groupBy('de.auftragsnummer');
$qb->orderBy('de.auftragsnummer', 'ASC');
Executed by the following code:
$query = $qb->getQuery();
$paginator = $this->get('knp_paginator');
$eintraege = $paginator->paginate($query, $request->query->getInt('page', 1), 20);
it results in having the variable "menge" always has the value 1.
if I execute $eintraege = $query->getResult();
then the value of "menge" is correct.
Is there anything wrong in my example, or is it a bug?
Thank you!
Metadata
Assignees
Labels
No labels