title: Dql in Query Builder
body: <p>I have been working some days with a dql problem.</p>
  
  <p>In my model, y have 2 entities (machine and instance). Is a one-to-many relation, so a machina could have many instances, and an Instance only can have 1 machine.</p>
  
  <p>Now, I want to get all machines which has some Instances. In normal dql i get it work correctly like that:</p>
  
  <pre><code>$ids = array(...)
  $dql = "select M from AppBundle:Machine M INNER JOIN AppBundle:Instancia I WITH M.id = I.machine WHERE I.software IN (:ids)";
  $query = $em-&gt;createQuery($dql)-&gt;setParameter('ids', $ids);
  $maquinas = $query-&gt;getResult();
  </code></pre>
  
  <p>But when I want to translate in a QueryBuilder i'm not getting it to work. I'm triying some ways:</p>
  
  <pre><code>//First way
  $qb = $this-&gt;createQueryBuilder("M")
  -&gt;innerJoin('Instancia', 'I', 'WITH', 'M.id = I.machine')
  -&gt;where('I.software IN (:ids)')
  -&gt;setParameters('ids', $ids);       
  $maquinas = $qb-&gt;getQuery()-&gt;getResult();
  
  //Second way
  $qb = $this-&gt;createQueryBuilder("x")
  -&gt;select('M')
  -&gt;from('AppBundle:Machine', 'M')
  -&gt;innerJoin('Instancia', 'I', 'WITH', 'M.id = I.machine')
  -&gt;where('I.software IN (:ids)')
  -&gt;setParameters('ids', $ids);       
  $maquinas = $qb-&gt;getQuery()-&gt;getResult();
  </code></pre>
  
  <p>What is my fault?</p>
  
  <p>Which way is more faster, simple dql or a querybuilder??</p>
  
  <p>Thank a lot!!</p>