0

I have a query look like this:

$limit = 3;    

$qb = $this->createQueryBuilder('media')
      ->leftJoin('media.file', 'file')
      ->leftJoin('file.meta', 'fileMeta')
      ->addSelect('file')
      ->addSelect('fileMeta');

$qb->setMaxResults($limit);

The limit of the setMaxResults function impact also the Joins and so I don't get all meta of the file. What is the common way to handle a limit only on the main entity?

Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42

0 Answers0