Hi,
I've got the following problem:
- there are 3 tables: A---<B---<C.
A: id, name
B: id, name
C:id, name
class A {
Integer id
String name
}
class B{
Integer id;
String name;
A a;
}
class C {
Integer id;
String name;
B b;
}
I want to retreive C object filtered by some filteres applied to all three tables: A, B, C.
In the other words do this:
......
session.enableFilter("ANameFilter").setParameter("name", "value");
session.enableFilter("BNameFilter").setParameter("name", "value");
session.enableFilter("CNameFilter").setParameter("name", "value");
List result = session.createQuery("from C").list();
The result should contain only object, which has: c.name="value", c.b.name = "value" and c.b.a.name = "value".
Of course, the number of entities can be higher than 3. I used this sample only to ilustrate the problem of recursive invoking filter for complex properties.
_________________ Jakub Miszkurka
|