Björn Kautler (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTFmODdjMzU0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16068?atlOrigin=eyJpIjoiOTFmOD...
) HHH-16068 (
https://hibernate.atlassian.net/browse/HHH-16068?atlOrigin=eyJpIjoiOTFmOD...
) Named native queries when retrieved from the entity manager lose ordinal parameter
mapping (
https://hibernate.atlassian.net/browse/HHH-16068?atlOrigin=eyJpIjoiOTFmOD...
)
Issue Type: Bug Affects Versions: 6.1.5 Assignee: Unassigned Attachments:
hibernate-problem.zip Created: 19/Jan/2023 08:18 AM Priority: Major Reporter: Björn
Kautler (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
It seems that if you have a native query where an ordinal parameter is used multiple
times, then the query is added and then retrieved by name, Hibernate breaks.
It seems like it internally changed all parameters to ? but then forgot the mapping from
ordinal parameter to query parameter.
See the tests in the attached reproducer project.
(
https://hibernate.atlassian.net/browse/HHH-16068#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16068#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#100214- sha1:5a2a1e8 )