Kai Hackemesser (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiODY0MDU3ZGNj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16844?atlOrigin=eyJpIjoiODY0MD...
) HHH-16844 (
https://hibernate.atlassian.net/browse/HHH-16844?atlOrigin=eyJpIjoiODY0MD...
) The expression "CAST ([some integer property] as string)" causes SQL exception
on informix DB (
https://hibernate.atlassian.net/browse/HHH-16844?atlOrigin=eyJpIjoiODY0MD...
)
Issue Type: Bug Affects Versions: 6.2.5 Assignee: Unassigned Attachments:
hibernate-cast.zip Components: hibernate-entitymanager Created: 25/Jun/2023 22:57 PM
Environment: Hibernate& hibernate-community-dialects 6.2.5 in Spring Boot& Spring
Data JPA 3.1.1 with informix JDBC driver 4.50.10, JDK 17 Priority: Minor Reporter: Kai
Hackemesser (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
While migrating to Spring Boot 3.x (including hibernate 5.x to 6.x) we found one of our
JPQL queries to fail while preparing the statement. We identified the problem was that the
expression CAST ( [some integer property] as string) causes an SQL exception - it
translates to native SQL CAST ( [fieldname] as text) causing cannot cast from integer to
text (informix error code “IX000”,-9634 ). The informix database is 14.10.FC10IE
I have attached a demo project with a unit test demonstrating the situation.
(
https://hibernate.atlassian.net/browse/HHH-16844#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16844#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#100227- sha1:a102ba3 )