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