Hibernate version: 2
Hi,
I would like to write a left outer join query, but not based on relations declared in HBM mappings, i.e. there is no collection or so to represent that relation.
SQL I would write :
Code:
select ...
from A a
left outer join B b on b.id = a.b_id
In HQL doc, I am told to write :
Code:
from A a left outer join a.b b
and it expects me to declare a many-to-many (or many-to-one) in a.hbm telling about relation between a and b.
Unfortunatly, I can't touch a.hbm, it's part of some external product we use.
I wish I could tell HQL how to make the join, without him looking in the HBM file. Is it possible ?
Note : if I can't use the outer join keyword, with Oracle I would write something like :
Code:
select ... from A a, B b where b.id = a.b_id (+)
but I guess there is no such feature in hibernate since it's pure Oracle syntax. or ?