Select with circular bidirectional association with joined inheritance subclass SyntaxErrorException
Description
Having a simple query like
fails when Cat inherits another class via InheritanceType.JOINED, “legs” is a bidirectional OneToMany-relation and the superclass of Cat has at least one field.
Adjusting the query to “SELECT leg, cat…” leads to a successfull fetch.
I have created a minimal example that can be found here:
I have tested the example with hibernate version 6.4.4.Final and also with the latest main (commit 688bb8a) both leading to the same result.
Checking older releases, I found that the bug was introduced with version 6.2.3.Final.
Having a simple query like
fails when Cat inherits another class via
InheritanceType.JOINED
, “legs” is a bidirectional OneToMany-relation and the superclass of Cat has at least one field.Adjusting the query to “SELECT leg, cat…” leads to a successfull fetch.
I have created a minimal example that can be found here:
I have tested the example with hibernate version 6.4.4.Final and also with the latest main (commit
688bb8a
) both leading to the same result.Checking older releases, I found that the bug was introduced with version
6.2.3.Final
.