Jan Vissers (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5cd53e1...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjI2NjdjZWNj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15653?atlOrigin=eyJpIjoiZjI2Nj...
) HHH-15653 (
https://hibernate.atlassian.net/browse/HHH-15653?atlOrigin=eyJpIjoiZjI2Nj...
) Named Native Query cannot be registered/used with named parameters (
https://hibernate.atlassian.net/browse/HHH-15653?atlOrigin=eyJpIjoiZjI2Nj...
)
Issue Type: Bug Affects Versions: 6.1.4 Assignee: Unassigned Attachments:
hibernate-named-parameters-reproducer.zip Components: hibernate-core Created: 01/Nov/2022
16:13 PM Environment: Hibernate 6.1.4.Final, H2 in-memory database - as referenced from
Helidon MP 3.0.2 project.
Java version 17.0.3-oracle on Ubuntu 22.10 Priority: Major Reporter: Jan Vissers (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5cd53e1...
)
For an more extensive description and reproducer, check the attached ZIP file.
Bottom-line: we create a named native query programmatically, with a named parameter and
register that with the EMF. Then upon execution, we create a native query referencing the
registered query, and call setParameter using the parameter name. This throws a NPE.
However, passing a positional parameter in setParameter succeeds (even though the
registered query does not use positional parameters).
(
https://hibernate.atlassian.net/browse/HHH-15653#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15653#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:a877796 )