title: Doctrine2: how to remove leftJoin part of QueryBuilder
body: <p>I have big fat QueryBuilder that generates sql like in <a href="https://stackoverflow.com/questions/17470852/slow-running-order-by-for-a-query-that-has-lots-of-joins">this question</a>. Apparently, all those leftJoins makes my query to crawl.</p>
  
  <p>So I figured I need to fetch only the IDs that match it and later, append</p>
  
  <pre><code>$ids = $cloneOfqb-&gt;select("o.id")-&gt;resetDqlPart("join")....-&gt;getResult() ;
  
  return $qb-&gt;andWhere("o.id IN (:ids)")-&gt;setParameter("ids", $ids)
  </code></pre>
  
  <p>The problem:</p>
  
  <p>This would work nicely but <code>resetDqlPart("join")</code> removes all joins, both <code>leftJoin</code> and <code>innerJoin</code>. I use innerJoins a lot as it makes code readable. Is there a way I can reset only leftJoins but leave innerJoins? It doesn't have to be QueryBuilder object, it can be a child like <code>Doctrine\ORM\Query</code> if needed.</p>