How do I get a full join of two tables unrelated from Hibernate perspective.
I have a requirement to join two tables not mapped with hibernate. I want something like:
Code:
List list=session.createQuery("select a,b from A a full join B b on a.col1=b.col1 where VERY LONG WHERE CONDITION").list();
Code:
list
is a list of Object[]. Object[1] should be null when it does not have a link and viceversa.
I guess I can do a left/right outer join using "NOT EXIST" clause.
But in this case, I end up executing 3 queries (1 inner join, 1 left, 1 right), with the same where condition.