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
throws
Caused by: java.lang.IllegalArgumentException: Component at index 0 has no alias, but alias is required
Found this bug while usin spring data with spring boot 3 which using hibernate-core 6+ version.
I prepared reproducer project with hibernate(without spring) and with spring boot 3 here. Same query but native work well,