title: Symfony2 QueryBuilder join ON and WITH difference
body: <p>I'm new with Symfony2 and I built successfully my first join through QueryBuilder and Doctrine 2.
  Probably this is a stupid question but both on-line and in the Symfony2's methods I was unable to find anything for understanding the difference between the join clauses "WITH" and "ON".</p>
  
  <p>For example this is my join code:</p>
  
  <pre><code>-&gt;leftJoin('EcommerceProductBundle:ProductData', 'pdata', 'WITH', 'prod.id = IDENTITY(pdata.product)')
  </code></pre>
  
  <p>It works good but if I put <code>ON</code> instead of <code>WITH</code> I get the following error:</p>
  
  <blockquote>
    <p>[Syntax Error] line 0, col 200: Error: Expected
    Doctrine\ORM\Query\Lexer::T_WITH, got 'ON'</p>
  </blockquote>
  
  <p>Why? I've seen among the objects that there are both the T_ON and T_WITH like join clauses, but which is their usage difference? What is their uses like?</p>