It should be possible to set query hints in Java code, or in orm.xml, but it seems the orm:hint element is ignored.
The following two options should result in the same query:
- Java only:
- Named query
- Define the query and the hint in orm.xml
- And then call the query without additional information
However, (2) does not correctly take the query hint into account and thus literals are replaced with SQL positional parameters.