title: hibernate query for fetching entity on multiple collection values
body: <p>I want to fetch an entity that contains two matching collection entities.</p>
  
  <pre><code>public class A {
      long id;
      Set&lt;B&gt; bs;
  }
  
  public class B {
      String name;
      String value;
  }
  </code></pre>
  
  <p>If I have the following table data</p>
  
  <pre><code>Table A
  ID     Name 
  1      pluto
  2      earth
  3      mars
  
  Table B
  ID     A_ID     NAME     VALUE
  1       1       abc       123
  2       1       xyz       789
  3       2       abc       456
  4       2       xyz       789
  5       3       abc       123
  </code></pre>
  
  <p>I want to fetch all "A's" that has at least 1 B with name='abc' and value='123' AND 1 B with name='xyz' and value='789'.  I want only the A named 'pluto' in this example as 'earth' doesn't have the correct value for "abc" and mars is missing "xyz".</p>
  
  <p>Do I have to use a subselect to do this?</p>