title: Join in @NamedQuery: Unexpected token ON
body: <p>In Hibernate, I created a query using <code>JOIN</code> to join two tables. The query executes fine in Oracles SQL Developer. However, if I add it to a <code>@NamedQuery</code>, the server starts with this error:</p>
  
  <blockquote>
    <p>Error in named query: loadFooByAnother: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: ON near line 1, column xxx</p>
  </blockquote>
  
  <p>My named query is:</p>
  
  <pre><code>SELECT foo FROM FooTable foo JOIN BarTable bar
    ON foo.something=bar.somethingId
      WHERE bar.anotherId=:another
  </code></pre>
  
  <p>Is it not possible to use <code>JOIN .. ON</code> syntax in Hibernate?</p>