title: HQL implicit join in where clause generate cross join instead of inner join
body: <p>I'm using Hibernate 3.6 and MSSQL 2012.</p>
  
  <p>When executing this HQL</p>
  
  <pre><code>select tbl.state from Property tbl where tbl.state = 1 and tbl.entity.state = 1 and
  tbl.entity.className = 'com....' and tbl.fieldName = 'fieldName'
  </code></pre>
  
  <p>I'm getting this SQL</p>
  
  <pre><code>select property0_.State as col_0_0_ from Properties property0_ cross join Entities
  entity1_ where property0_.refEntityid=entity1_.id and property0_.State=1 and
  entity1_.State=1 and entity1_.ClassName='com....' and property0_.FieldName='fieldName'
  </code></pre>
  
  <p>*Notice the <strong>cross join</strong> and the <strong>added condition</strong> in the where clause.</p>
  
  <p>According to Hibernate docs <a href="https://docs.jboss.org/hibernate/core/3.5/reference/en/html/queryhql.html#queryhql-joins-forms" rel="noreferrer">https://docs.jboss.org/hibernate/core/3.5/reference/en/html/queryhql.html#queryhql-joins-forms</a></p>
  
  <p>implicit join should generate to <strong>inner join</strong>.</p>
  
  <p>I've noticed that there is an open bug <a href="https://hibernate.atlassian.net/browse/HHH-7707" rel="noreferrer">https://hibernate.atlassian.net/browse/HHH-7707</a> that may be referring to this problem but no one answered and it's opened for a year already.</p>
  
  <p>I would appreciate any information about this issue. Thank you.</p>
  
  <p>PS. I'm well aware that using implicit joins is not the right way of writing HQL but I can't do anything about this right now.</p>