Hi!
Let's say, I have 3 classes: A, B, C which have bidirectional OneToMany associations:
A.java
Code:
public class A{
private List<B> bList;
//... other code
}
B.java
Code:
public class B{
private List<C> cList;
private A aParent;
//... other code
}
C.java
Code:
public class C {
private Long cId;
private String cName;
private B bParent;
//... other code
}
I need to get proper hierarhy of objects, filtering only by some property of the C class.
Another words I need to get List<A> where every A instance contains only those B instances, which have only those C instances, that match specified query - I need something like "filtered in depth" query.
Could anyone explain me how to do this?
Thanks in advance.