| Fails since: https://github.com/hibernate/hibernate-orm/commit/5ac46eb70359a45a34f7a64e859df106928baa94 Not sure why it works on H2, have to investigate that, but to me it's clear why it doesn't work in general. Currently joins to "table groups" like it is the case with joins on joined inheritance entities or join tables will generally render in a way that prevents from using any column of the "table group" in the on clause. Left joins use the subquery rewriting strategy I implemented which makes it work. A temporary solution to this problem would be to put the on clause condition into the where clause. The general solution that handles all use cases would be to render a grouped join a.k.a. ANSI SQL <joined table> but I am still discussing how I could do that. |