Impossible to give same path expression multiple aliases
Description
Simple example:
select a.id as id1, a.id as id2 from Entity a
This doesn’t work anymore as of Hibernate 6 because the selection alias is kept on the SQM node directly, leading to the following exception:
Not sure yet how to solve this, but this is blocking Blaze-Persistence from being usable with Hibernate 6. Maybe this is as simple as keeping the alias in a field in SqmSelectionand just relying on the alias in the AbstractTupleElementto mutate throughout the query parsing process.
Also test if ordering by id1 or id2 will cause issues due to selection item deduplication.
Simple example:
select a.id as id1, a.id as id2 from Entity a
This doesn’t work anymore as of Hibernate 6 because the selection alias is kept on the SQM node directly, leading to the following exception:
Not sure yet how to solve this, but this is blocking Blaze-Persistence from being usable with Hibernate 6. Maybe this is as simple as keeping the alias in a field in
SqmSelection
and just relying on the alias in theAbstractTupleElement
to mutate throughout the query parsing process.Also test if ordering by
id1
orid2
will cause issues due to selection item deduplication.