Fakhri Nasibov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5afdbe0...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYjZmNzU5MGQz...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-17018?atlOrigin=eyJpIjoiYjZmNz...
) HHH-17018 (
https://hibernate.atlassian.net/browse/HHH-17018?atlOrigin=eyJpIjoiYjZmNz...
) IllegalAurgumentException when trying to run window function HQL (
https://hibernate.atlassian.net/browse/HHH-17018?atlOrigin=eyJpIjoiYjZmNz...
)
Change By: Fakhri Nasibov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5afdbe0...
)
Query
{noformat}select contact from (select numeredContact, row_number() over(partition by
numeredContact.name, numeredContact.phone) as num from Contact numeredContact ) as contact
where contact.num = 1{noformat}
throws
{noformat}Caused by: java.lang.IllegalArgumentException: Component at index 0 has no
alias, but alias is required{noformat}
Found this bug while usin spring data with spring boot 3 which using hibernate-core 6+
version.
I prepared [reproducer
project|https://github.com/fnasibov/WindiwedFunctionIssue] with
hibernate(without spring) and with spring boot 3
[
here|https://github.com/fnasibov/exploringStarters].
Same query but native work well,
So as i debugged: component with index 0 has alias but when i try in debugger
component.getAlias() it return null (added screenshot with debugger)
in class org/hibernate/query/derived/AnonymousTupleType.java:59
Hope it wil be helpful !
!image-20230731-212312.png|width=1460,height=977!
(
https://hibernate.atlassian.net/browse/HHH-17018#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17018#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#100233- sha1:b4f309b )