title: hibernate criteria with exists clause
body: <p>I cannot find a solution to a problem that seems to be easy. Say there are 2 entity classes:</p>
  
  <pre><code>class A {
     Set&lt;B&gt; bs;
  }
  
  class B {
     String text;
  }
  </code></pre>
  
  <p>How to create a criteria query that returns all A's that contains at least one B entity which fulfills a given condition (like b.text = 'condition')? </p>