title: How use hibernate criteria for a left outer join without direct link into the two tables
body: <p>I'm trying to translate a SQL quest into Hibernate criteria.</p>
  
  <p>My quest is working in SQL :</p>
  
  <pre><code>    select * from objective 
      left outer join conditionstate 
        on objective.conditionid = conditionstate.conditionid 
           and conditionstate.personid = XXXX 
      where objective.toto_id = YYYYY 
  </code></pre>
  
  <p>The objective is not directly mapped to the condition_state, but into a condition.</p>
  
  <pre><code>objective --&gt; condition &lt;-- condition_state
  </code></pre>
  
  <p>I've tested something like : </p>
  
  <pre><code>    final DetachedCriteria criteriaObjective = 
         DetachedCriteria.forClass(Objective.class);
      criteriaObjective.createAlias("conditionState", "conditionState", Criteria.LEFT_JOIN);
  </code></pre>
  
  <p>without success..</p>