title: Hibernate Criteria Query without Relationship Between Entities
body: <p>I have two tables:</p>
  
  <pre><code>A (x, y, z, date1, date2)
  B (t, date1, date2)
  </code></pre>
  
  <p>I want to execute a query like this:</p>
  
  <pre><code>SELECT A.x, A.y, A.z, A.date1
  FROM   A, B 
  WHERE  A.date1 &lt; B.date1 
  AND   (A.date2 is null or A.date2 &lt;= B.date2 )
  ORDER BY A.x DESC;
  </code></pre>
  
  <p>How can I do that using Hibernate Criteria?</p>