I tried executing the below Query as a NativeSql query and I see it works well without any error and I could retrieve the the records. But the issue is that Oracle hint LEADING is not recognized.
When I copy the query and run it directly in SQL Developer it works well with the hint and the order of this result differs from the order of results I received from application.
https://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements006.htm#BABJIHCI
SELECT /*+ LEADING(e j) */ e.name, d.department FROM
employees e, departments d, job_history j
WHERE e.department_id = d.department_id
AND e.hire_date = j.start_date;
The issue is that the use of Hint is silently ignored by hibernate and so it produces the results in the order as If no hint is used. So the question is how and why the hint is silently ignored by application?