i have an entity driver and an entity car. One driver has many cars. I have the following dql query:
$query = $this->getEntityManager()->createQuery('select d, c FROM driver d JOIN d.cars c WHERE c.color=:color');
$query->setParameter('color', $color);
$query->setFirstResult((int)$offset ? $offset*15 : 0 );
$query->setMaxResults(15);
The resultlist has 5 rows. But when i perform the created sql query in the console, then i have 15 rows. When i change the join type to left join, the rows are count by car not by driver. But i'm using a pager for read the drivers who have red cars.
Does anybody know what i'm doing wrong? Thank you very much.