title: Hibernate cross join and not inner join
body: <p>I have two entities (Order, Account) and use the following relationship:</p>
  
  <pre><code>@ManyToOne(optional = false)
  @JoinColumn(name = "account_id", nullable = false)
  public Account getAccount() {
      return account;
  }
  </code></pre>
  
  <p>I want to get all orders by Account name.
  I am using JPA repository and all I need is to define method with specific name:</p>
  
  <pre><code>public interface OrdersRepository extends JpaRepository&lt;Order, String&gt; {
      List&lt;Order&gt; findByAccountName(String accountName);
  }
  </code></pre>
  
  <p>Hibernate generates the following sql query:</p>
  
  <pre><code>select order0_.id as id1_1_, order0_.account_id as account20_1_ from orders order0_ cross join accounts account1_ where order0_.account_id=account1_.id and account1_.name = ?
  </code></pre>
  
  <p>I understand that having <code>order0_.account_id=account1_.id</code> condition cross join has the same behavior as inner join, but my question is: 
  Why hibernate does not use inner join? 
  It looks for me that I missed something in config.</p>
  
  <pre><code>hibernate.dialect=org.hibernate.dialect.MySQLDialect
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;5.0.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;5.0.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
          &lt;version&gt;1.9.2.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>