title: Unknow column in ON clause
body: <p>I have the following query:</p>
  <pre><code>select p.idPerson from person p &quot;
          + &quot; join dog g on g.idDog = p.idDog, &quot;
          + &quot; tree t &quot;
          + &quot; join parents p1 on p1.idParents = t.idParents &quot;
          + &quot; join parents p2 on p2.idParents = p.idParents &quot;
  </code></pre>
  <p>I've changed parameters, i know these query doesn't make sense, i'ts just to show you the structure, so my error is:</p>
  <pre><code>Unknown column 'p.idParents' in 'on clause'
  </code></pre>
  <p>This does even less sense, i think the error is on the &quot;tree t&quot;, the only one which is not join, but i don't know how to solve it becuase it hasn't got any relation with the other tables to do a join.</p>
  <p>Thanks!</p>