While for a JPQL query, the {{SessionImpl}} call {{applyQuerySettingsAndHints}}, for native SQL queries this does not happen.
By calling {{applyQuerySettingsAndHints}} we could auto-apply query hints (e.g. query timeout), as explained in [this article|https://vladmihalcea.com/query-timeout-jpa-hibernate/].
It would be great if we could set a global query timeout for both JPQL and native SQL queries.
More, after studying the code base, it looks like the {{applyQuerySettingsAndHints}} call is not consistently applied even for JPQL queries, and that should be sorted out as well.
|
|