There are actually a few tests that try what I can only assume you are doing there which work without problems, so a reproducer with e.g. https://github.com/hibernate/hibernate-test-case-templates would be very much appreciated so that we can analyze this further. I suspect your JPA model uses a mapping that is simply not covered by the Hibernate test suite. Your issue is probably not related, but we have a fix for similar problems when referring to properties only in the ON/WITH clause here: https://github.com/hibernate/hibernate-orm/pull/3088 |