I have two following classes mapped in hibernate mappings
Class A1 {
long ID;
String t1;
String t2;
}
Class B1 {
long ID;
String t3;
String t4;
}
I am wondering if it's possible to create a HQL equivalent using criteria API
SELECT {a.*}
FROM A1 AS a, B1 AS b
WHERE a.t1 = b.t3 AND a.t2 = b.t4
I looked up "correlated subqueries" but I can't seem to figure out a correct way to do this as A1 and B1 are not linked by any FK constraints.
[ March 09, 2008: Message edited by: James Cheng ]