Christoph Aigensberger (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a72294...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjE0NDk0YTBm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16401?atlOrigin=eyJpIjoiNjE0ND...
) HHH-16401 (
https://hibernate.atlassian.net/browse/HHH-16401?atlOrigin=eyJpIjoiNjE0ND...
) Hibernate does not escape Parameters correctly when using Oracle which causes ORA-00904
(
https://hibernate.atlassian.net/browse/HHH-16401?atlOrigin=eyJpIjoiNjE0ND...
)
Change By: Christoph Aigensberger (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a72294...
)
I have updated to the latest Development Version, and I am now seeing ORA-00904 poping up
all over my Spring Boot development environment.
JDBC exception executing SQL [… (b1_0.field1!=K or (b1_0.field1!=H …] [ORA-00904:
"H": invalid identifier
] [n/a]; SQL [n/a]
It seems like HQL Parameters are incorrectly escaped
This is how they look in the HQL … test.field1='K' or
test.field<>'H' …
The same issue arrises when a Boolean with a converter is converted to a String.
I.e. lets take a converter that translates true → “Y” and false → “N“
JDBC exception executing SQL [… (b1_0.field1=Y …] [ORA-00904: "Y": invalid
identifier
] [n/a]; SQL [n/a]
This is how the query looks in the HQL … test.field1= true …
Is this a issue caused by Hibernate or should I reach out to Spring Data?
I am also unsure how to build a test case for this as it only seems to apply to Oracle, I
still attempted it, but was unable to reproduce it on my end with it
(
https://hibernate.atlassian.net/browse/HHH-16401#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16401#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#100219- sha1:6a6077b )