Hi, when using an entity with @Inheritance(strategy = InheritanceType.JOINED)
that has some subtypes, the alias syntax {i.*}
in a Hibernate native query seems to not resolve the aliases for the subtype tables anymore in Hibernate 6.6.17.Final
compared to Hibernate 5.6.15.Final
. Assuming, I’m having two subtypes, the rendered select statement used to look something like:
SELECT i.a, i.b, i_1_.c, i_2_.d
now in Hibernate 6 it seems that each subtype table does not get an alias anymore, e.g.
SELECT i.a, i.b, i.c, i.d
which leads to errors as the columns do not exist in the table with alias i
, e.g. as if we would be using InheritanceType.SINGLE_TABLE
. Am I missing some way to tell the native query that it needs to use the joined inheritance type?
Unfortunately, I did not find anything in the official migration guide as well.