JPQL IN clause gives error if you use interface for entity Could not locate TableGroup

Hi, seems similar exception was discussed but in different context.
So let’s say I have 2 queries:

		String queryStr = "SELECT entity" +
				"        FROM org.hibernate.bugs.IEntityB entity" +
				"        WHERE entity.id=:myId";

org.hibernate.bugs.IEntityB is interface
and it words fine
if I do

String queryStr = "SELECT entity" +
				"        FROM org.hibernate.bugs.IEntityB entity" +
				"        WHERE entity.id IN :myId";

So the only thing that was changed is IN clause instead of =
it gives me the error
org.hibernate.sql.ast.SqlTreeCreationException: Could not locate TableGroup - org.hibernate.bugs.IEntityB(entity)

Bot queries work fine if I use entity class instead of interface.

The behavior changed from what it was in prev versions of hibernate, and I’m wondering if this is expected behavior as it seems it accepts interfaces if I don’t do IN clause ?
So is this correct ?

It will also fail if I do MAX function like this

		String queryStr = "SELECT MAX(entity.number)" +
				"        FROM org.hibernate.bugs.IEntityB entity" +
				"        WHERE entity.id=:myId";

Try Hibernate 6.2.5.Final and if that doesn’t work, please create an issue in the issue tracker(https://hibernate.atlassian.net) with a test case(hibernate-test-case-templates/orm/hibernate-orm-6/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub) that reproduces the issue.

Hi,
thanks for the answer, tested with 6.2.5 and created issue
https://hibernate.atlassian.net/browse/HHH-16824

PR: HHH-16824 Demonstrates issue with jpql parser couldn't locate tablegroup when you have MAX in your query or use IN clause by oleksiimiroshnyk · Pull Request #280 · hibernate/hibernate-test-case-templates · GitHub