I am trying to select a field that is in one of two classes. The association is not (cannot be) mapped because of restrictions on foreign key reuse. So I'm trying to sneak an outer join, with this HQL
Code:
select ... from mainclass h, someclass q, otherclass r where ...
and ((q.keyclass.key1 = h.keyclass.key1 and q.keyclass.key2 = h.keyclass.key2 )
or (r.keyclass.key1 = h.keyclass.key1 and r.keyclass.key2 = h.keyclass.key2))
The field is never in both files at the same time. The inner join (default) puts an entry in the result set that doesn't match the key restriction. I suppose that is design, not a bug?