Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZDEzNjg4YWVj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16786?atlOrigin=eyJpIjoiZDEzNj...
) HHH-16786 (
https://hibernate.atlassian.net/browse/HHH-16786?atlOrigin=eyJpIjoiZDEzNj...
) NPE in SqmParameterInterpretation when binding null for select item in insert-select
statement (
https://hibernate.atlassian.net/browse/HHH-16786?atlOrigin=eyJpIjoiZDEzNj...
)
Issue Type: Bug Affects Versions: 6.2.4 Assignee: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core Created: 13/Jun/2023 01:17 AM Priority: Major Reporter:
Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
An NPE happens in SqmParameterInterpretation.resolveSqlSelection because we try to resolve
the SqmExpressible type somehow, but if binding null, the parameter has no type in a query
like this:
insert into EntityA (attribute) select :param from OtherEntity
The logic is faulty in SqmParameterInterpretation as it shouldn’t try to resolve the
SqmExpressible. Type resolution already happened, we just need to make use of it.
(
https://hibernate.atlassian.net/browse/HHH-16786#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16786#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#100225- sha1:956085d )