Hi,
We also would like to see this functionality added to hibernate.
Being forced to re-implement HQL queries using native SQL to address performance problems is a big inconvenience.
Could a JIRA task for this work be created?
FYI, I did a little bit of checking, and it looks like both Informix and Oracle use pretty much the same syntax (i.e. SQL comments after the SELECT token):
http://www.dbasupport.com/oracle/ora9i/ ... ints.shtml
http://publib.boulder.ibm.com/infocente ... erf318.htm
MySQL seems to support adding hints as part of the join syntax:
http://dev.mysql.com/doc/refman/5.1/en/join.html
PostgreSQL doesn't support query hints at all, so that dialect is a non-issue.
I imagine that there can't be too many possible permutations... if so, couldn't the Loader implementation completely delegate this special massaging of the SQL to the Dialect?
Please let us know if you'd be receptive to a patch to add this functionality, or if you have any advice on how to approach the problem.
Thanks.