Hello,
I have two entities. The first refers the second and the association is mapped with many-to-one in hbm.xml file. This association is nullable (not-null="false").
If I use
Code:
from First
it works fine. All records from First are displayed.
If I run query like
Code:
from First f order by f.second.property
I get result without records with f.second = null
This behavior is right because HIbernate generates inner join in the sql query. But I need outer join to be generated.
I know there is possibility to write the outer join explicitly to hql query like
Code:
from First f left outer join f.second order by f.second.property
but it's not good solution for me because many selects have to be rewritten.
Is here any possibility to tell Hibernate to generate outer join for any query where the Second class is used and the assotiation is nullable?
I use version 3.2.5.GA
Thanks for advices
blaf