Andrei Nikulin (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiODUzMjhmZTcx...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15745?atlOrigin=eyJpIjoiODUzMj...
) HHH-15745 (
https://hibernate.atlassian.net/browse/HHH-15745?atlOrigin=eyJpIjoiODUzMj...
) IllegalArgumentException while executing Like query with Escapes (
https://hibernate.atlassian.net/browse/HHH-15745?atlOrigin=eyJpIjoiODUzMj...
)
Issue Type: Bug Affects Versions: 6.1.5 Assignee: Unassigned Created: 22/Nov/2022 06:21 AM
Priority: Major Reporter: Andrei Nikulin (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Found possible regression.
It is somehow related to Like queries and Escape characters.
If I execute a query :
from User user where user.name like ?1 escape '\'
or user in (
select distinct trans.classifier from UserTranslation trans where trans.translation like
?2 escape '\'
)
then I get an error:
java.lang.IllegalArgumentException: org.hibernate.query.sqm.InterpretationException: Error
interpreting query [from UserTranslation where classifier.id=?1]; this may indicate a
semantic (user query) problem or a bug in the parser [from UserTranslation where
classifier.id=?1]
Passing test with Hibernate 5 dependency: h5-passing (
https://github.com/NikulinAndrei/spring-boot-3-test/tree/h5-passing )
Failing test with Hibernate 6 dependency: h6-escape-failing (
https://github.com/NikulinAndrei/spring-boot-3-test/tree/h6-escape-failing )
Failing test is *shouldQueryTranslationLike*
(
https://hibernate.atlassian.net/browse/HHH-15745#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15745#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:eab5823 )