title: Hibernate generates cross join instead of left join
body: <p>I'm using hibernate 3.6.10.Final and MySQL 5.5.</p>
  
  <p>I wrote a dynamic query like this:</p>
  
  <pre><code>"from " + clazz.getName()+ " ORDER BY "+sortField+" "+sortDirection
  </code></pre>
  
  <p>My hibernate entities have a many to one parent/child relationship.
  if the query is ordered by a field from parent, hibernate generates this hql select:</p>
  
  <pre><code>select parent0_.ID as ID10_, parent0_.ID_CHILD as ID6_10_ 
  from parent parent0_
  order by parent0_.PARENTFIELD ASC
  </code></pre>
  
  <p>if the query is ordered by a field from child, i have the following hql:</p>
  
  <pre><code>select parent0_.ID as ID10_, parent0_.ID_CHILD as ID6_10_
  from parent parent0_
  cross join child1_
  where parent0_.ID_CHILD = child1_.ID
  order by child1_.CHILDFIELD ASC
  </code></pre>
  
  <p>The second query returns less results because parent0_.ID_CHILD can be null.
  Is there a way to force hibernate to generate a left join?</p>
  
  <p>I need something like this</p>
  
  <pre><code>select parent0_.ID as ID10_,
     parent0_.ID_CHILD as ID6_10_
  from
  parent parent0_
      left join
  child child1_
  on
  parent0_.ID_CHILD = child1_.ID
  order by child1_.CHILDFIELD ASC
  </code></pre>