title: What's "wrong" with my DQL query?
body: <p>I have the following SQL query:</p>
  
  <pre><code>select bank.*
  from bank
  join branch on branch.bank_id = bank.id
  join account a on a.branch_id = branch.id
  join import i on a.import_id = i.id
  </code></pre>
  
  <p>It returns exactly what I expect.</p>
  
  <p>Now consider the following two DQL queries:</p>
  
  <pre><code>      $q = Doctrine_Query::create()
          -&gt;select('Bank.*')
          -&gt;from('Bank')
          -&gt;leftJoin('Branch')
          -&gt;leftJoin('Account')
          -&gt;leftJoin('Import');
  </code></pre>
  
  <p>-</p>
  
  <pre><code>      $q = Doctrine_Query::create()
          -&gt;select('Bank.*')
          -&gt;from('Bank')
          -&gt;innerJoin('Branch')
          -&gt;innerJoin('Account')
          -&gt;innerJoin('Import');
  </code></pre>
  
  <p>It would have been nice to have been able to use a "join()" method but, from the official Doctrine join documentation here, it says, "DQL supports two kinds of joins INNER JOINs and LEFT JOINs." For some reason that thoroughly escapes me, they chose not to support natural joins. Anyway, what that means is that the two queries above are my only options. Well, that's unfortunate because <em>neither of them work</em>.</p>
  
  <p>The first query - the one with left joins - doesn't work because, of course, a left join and a natural join are two different things.</p>
  
  <p>The second query doesn't work, either. Bafflingly, I get an error: "Unknown relation alias."</p>
  
  <p><strong>Why should Doctrine be able to figure out the alias for a LEFT JOIN but not for an INNER JOIN?</strong></p>
  
  <p>By the way, I realize INNER JOIN and JOIN are only nominally different but why implement the more specific one and not the canonical, <em>natural</em> one?</p>