Hello,
We are in the process of upgrading from Hibernate 3.2 to either Hibernate 3.6.10 or 4.x. Unfortunately, HQL queries as the following one:
Code:
select distinct childTable from parentTable order by parentTable.childTable.description
generate incorrect queries (with both Oracle10gDialect and DB2Dialect) like the following one:
(In Hibernate 3 Oracle10gDialect or DB2Dialect, in hibernate 4 is similar and also incorrect).
Code:
SELECT ...
FROM PARENT_TABLE parentTable0 inner join CHILD_TABLE childTable1 ON [condition] ,
CHILD_TABLE childTable2 order by childTable2.A_DESCRIPTION
Notice this works correctly if we use explicit joins but due to our huge codebase and the dynamic nature of many of our queries this would be an extremely costly task.
Is this a bug in Hibernate 3.5-3.6-4? According to the documentation navigating through deferencing via dot notation should work; is there any in-depth documentation about the cases in which implicit joining works and the cases in which it doesn't? I cannot find any documentation or bug report about this behaviour.