I have the following generic entity setup.
And I am trying to execute this criteria query:
I get “could not resolve attribute id on JpaUserRole” error. Same issue occurs if I join with “role” and query a role field. I am not sure but this may be due to Hibernate resolving members from the declaring type (JpaUserRole) instead of the persistent type (TestUserRole) I traced the issue until “org.hibernate.metamodel.internal.normalMemberResolver where the member is resolved from the declaring type but could not go further. Maybe there is no solution due to type erasure. I just wanted to learn if what I am trying to do is possible. Sorry that I have both Kotlin and Java code in the same issue 🙂 |