title: JPQL JOIN on Foreign Key causes SQLSyntaxErrorException
body: <p>I have two entities <code>Order</code> and <code>Customer</code>. <code>Order</code> has a <code>@ManyToOne</code> relationship with <code>Customer</code>. However, when I declare the following JPQL query, I get an <code>SQLSyntaxErrorException</code> because the generated SQL is missing the <code>ON</code> condition.</p>
  <p>JPQL:</p>
  <pre><code>SELECT o.id,
         o.incrementId,
         o.externalId,
         o.state,
         o.status,
         o.couponCode,
         o.totalDiscount,
         o.total,
         o.originChannel,
         o.branchOffice,
         o.createdAt,
         o.updatedAt,
         c.fullName
  FROM Order o
  JOIN FETCH Customer c;
  </code></pre>
  <p>Generated SQL:</p>
  <pre class="lang-sql prettyprint-override"><code>select order0_.id             as col_0_0_,
         order0_.increment_id   as col_1_0_,
         order0_.external_id    as col_2_0_,
         order0_.state          as col_3_0_,
         order0_.status         as col_4_0_,
         order0_.coupon_code    as col_5_0_,
         order0_.total_discount as col_6_0_,
         order0_.total          as col_7_0_,
         order0_.origin_channel as col_8_0_,
         order0_.branch_office  as col_9_0_,
         order0_.created_at     as col_10_0_,
         order0_.updated_at     as col_11_0_,
         customer1_.full_name   as col_12_0_
  from orders order0_
  inner join customers customer1_ on;
  </code></pre>
  <p>As you can see, it's missing the condition <code>on</code>. I find that strange, because these are my entities:</p>
  <p><strong>Order</strong> (Irrelevant properties omitted for brevity)</p>
  <pre class="lang-java prettyprint-override"><code>@Entity
  @Table(name = &quot;orders&quot;)
  public class Order {
      
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     private int id;
      
     @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
     @JoinColumn(name = &quot;customer_id&quot;, referencedColumnName = &quot;id&quot;, table = &quot;orders&quot;)
     private Customer customer;
      
     public Customer getCustomer() {
         return customer;
     }
  }
  </code></pre>
  <p><strong>Customer</strong> (Irrelevant properties omitted for brevity)</p>
  <p><em>My use case doesn't require that I have a <code>List&lt;Order&gt;</code> in the <code>Customer</code> entity</em> (I tried adding it and that doesn't solve the problem anyway.</p>
  <pre class="lang-java prettyprint-override"><code>@Entity
  @Table(name = &quot;customers&quot;)
  public class Customer {
      
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     private int id;
      
     public int getId() {
        return id;
     }
      
     public void setId(int id) {
        this.id = id;
     }
  }
  </code></pre>
  <p>The relationship between these two entities is correct because it works as expected when it comes to inserting, updating and retrieving by normal means. Am I missing something here?</p>