Method org.hibernate.sql.Template#renderWhereStringTemplate discards some tokens when analyzing part of subquery prefixed by one of strings contained in LITERAL_PREFIXES
To fix the problem, temporary look ahead StringTokenizer , similar to one used in main branch of same class, should be used.
Test case and solution to the problem are in pull request #9639
Activity
Marco BelladelliFebruary 11, 2025 at 1:54 PM
Thanks! Since all tests are green, I’ve approved the PR for the 6.6 branch.
Čedomir IgalyFebruary 5, 2025 at 4:42 PM
Do not know why I’ve did not tried firt to backport changes Now I’ve did that in #9698 , and closed #9639
Marco BelladelliFebruary 5, 2025 at 12:53 PM
@Čedomir Igaly if this issue fixed in main? If so, I imagine it was solved by the changes for https://hibernate.atlassian.net/browse/HHH-18570. It would be nice if, instead of just a partial solution, we could backport the changes as-is to keep them aligned between versions.
Could you check if there any any backwards-incompatible changes there? If not, we should be able to cherry pick the improvements from the original PR. And if there are, please report them here so we can evaluate how to proceed.
See Hibernate 6.6.X regression with join formula
Method
org.hibernate.sql.Template#renderWhereStringTemplate
discards some tokens when analyzing part of subquery prefixed by one of strings contained inLITERAL_PREFIXES
To fix the problem, temporary look ahead
StringTokenizer
, similar to one used in main branch of same class, should be used.Test case and solution to the problem are in pull request #9639