I'm trying to create a HQL query with a left outer join on tables that are created at runtime.
the following code is the simplified HQL query, which is basically the same.. whatever is in the left outer join clause is created at runtime, and is unlimited by the number of selections in the union
select distinct r.Param1, r.Param2, r.Param3
from Classpath.Classname r
left outer join (
select something1, something2 from somewhere where something1 in (1,2,3)
union all
select something1, something2 from somewhere where something1 not in (5,8,9)
union all
select something1, something2 from somewhere where something1 = 10
) tblName on tblName.something = r.Param1
where other conditions
How can I make this work?