title: hibernate - HQL joins on many clauses
body: <p>I've been reading Hibernate documentation, but I haven't found anything that would explain how to do the following.</p>
  
  <p>I have the following SQL code that I'm trying to convert to HQL:</p>
  
  <pre><code>SELECT {msg.*}, {cmd.*} 
  FROM Schema.Messages AS msg 
    LEFT OUTER JOIN schema.send_commands AS cmd 
      ON cmd.message_key = msg.unique_key 
      AND ( lower(cmd.status) IN (lower('failed') ) ) 
  WHERE msg.sequence_received &lt; 10";
  </code></pre>
  
  <p>The mainissue I'm having is that I'm unable to have two clauses on a LEFT OUTER JOIN. HQL allows me to have 
       <code>ON cmd.message_key = msg.unique_key</code>
  , but how do I add the 
  <code>AND clause 2?</code></p>