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";