title: JPA Criteria API: How to select property in nested collection
body: <p>I have a class <code>Customer</code> and <code>CustomerDependant</code> entities. <code>Customer</code> has many to many bi-directional relationship with its dependents. I need to find customers filtering by name and dependent name.</p>
  
  <p>It's done something like this in JPQL: </p>
  
  <pre><code>select c join fetch c.dependants d from Customer c where c.name like
  'foo' and d.name like 'foo'
  </code></pre>
  
  <p>How I can do the same thing with JPA Criteria Queries?</p>