I have a model A that has a many to many with B, which has a property c. Like the following.
class A {
@ManyToMany
List<B> bs;
}
class B {
@ManyToMany
List<A> as;
String c;
}
Is there a way (using detached criteria) to do a query like this: select all As where there exists a b in bs where b.c = some value? And if I can how would I do this?