| the hint 'HINT_PASS_DISTINCT_THROUGH' does not take effect if the 'hibernate.use_sql_comments' property is enabled. This happens because the 'org.hibernate.loader.Loader.processDistinctKeyword(...)' method checks the condition 'sql.startsWith( SELECT_DISTINCT )' in order to perform the 'distinct' keyword removal. If the 'hibernate.use_sql_comments' is enabled the comments (/.../) precede the 'distinct' keyword and aforementioned condition check fails. |