Named query parsing fails on startup

Migrating to hibernate 6, currently using 6.1.7
And my application fails on startup with error
Unable to build Hibernate SessionFactory; nested exception is org.hibernate.HibernateException: Errors in named queries: ABC, CDE, XYZ…

The most meaningful error is:
Suppressed: org.hibernate.query.SemanticException: Illegal implicit-polymorphic domain path in subquery ‘org.ABCDE’

Looking into named queries we have in the project and the very first reported I think I was able to identify the following query(defined in *.orm.xml)

<query>SELECT abcde FROM org.ABCDE abcde WHERE = (SELECT MIN( FROM org.ABCDE smallABCDE)</query>

It was written ages ago, and so survived through a number of hibernate upgrades and now hibernate 6 thinks that query is invalid.
Any suggestion why and what does need to be changed ?
Should I create an issue(can you please point me where & how?), or it is expected behavior ?

The error seems to point to a polymorphic path used in an unexpected way. If you think this might be a bug, you can create a new JIRA issue here and please include a simple reproducer, you can start from our GitHub - hibernate/hibernate-test-case-templates: Templates and examples to report issues to Hibernate.

Thanks for the answer,
Yes org.ABCD is the interface, so probably that’s why it has some polymorphic logic invoked…but still not sure why does it think that interface can’t be used in subquery… will file ticket, maybe will get more details and this is correct…