title: doctrine not exists subquery
body: <p>I have in a repository this code:</p>
  
  <pre><code> public function getNotAssignedBy($speciality, $diploma)
  {
      $qb = $this-&gt;createQueryBuilder('j')
          -&gt;select('DISTINCT(j.id) id', 'j.firstName', 'j.lastName', 'j.dateBirth', 'j.sex')
          -&gt;leftJoin('j.qualifications', 'q')
      ;
  
  
      if ($speciality) {
          $qb-&gt;andWhere('q.speciality = :speciality_id')-&gt;setParameter('speciality_id', $speciality);
      }
      if ($diploma) {
          $qb-&gt;andWhere('q.diploma = :diploma_id')-&gt;setParameter('diploma_id', $diploma);
      }
  
      $result = $qb-&gt;getQuery()-&gt;getResult();
  
      return $result;
  }
  </code></pre>
  
  <p>How can I get only rows where id not exists in another entity ?? </p>
  
  <p>Any help. Thanks</p>