We are looking into the impact of outer-join on the quantity and quality of the SQL generated by Hibernate. Outer-join configuration worked, as documented, for loading of individual objects and queries built by Hibernate Criteria interface. Outer-join configuration does not make a difference for the top-level object and its direct references, when HQL query is executed, unless one explicitly mentions joins in the HQL query.
For example, For an object Deal with two <many-to-one> associations and a single collection, Hibernate does not create join when retrieving the Deal Object. However, joins are created on all down stream objects. The code is really a single line code.
session.createQuery("from DealImpl as deal where deal.objectId = 501").list();
Is that expected behavior? If not, any ideas what I might be doing wrong?
Thanks and regards
Zafar
|