Hibernate HQL - LEFT JOIN with subquery

Viewed 309

Is it possible in Hibernate to do a query like this? I retrieve an error at the subquery position.

select *
from table1 as t1 
  left join (
     select t2.* 
     from table2 as t2 
     where t2.column1='xx' 
        and t2.column2='yy'
) t2 on t1.key = t2.fkKey
where t1.column1='condition'
  and t1.column2='condition';
0 Answers
Related