From https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#associations-JoinFormula, it seems the annotated field should be some column field in child class. You are using it on parent class and I am almost certain such feature would never be supported, for basically the mechanism aims to provide a customized foreign key, so using it on child class’s ManyToOne field does make sense. |