I see that the mappedBy association is excluded because of this [code|https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java#L53-L55 ] in EnhancementHelper#includeInBaseFetchGroup. When this code commented out, the association gets eagerly loaded. I think it should be possible to load the association as a proxy in the case where the opposite side of the association is annotated with @MapsId without any arguments. Same should be true when the opposite side of the association is annotated with @PrimaryKeyJoinColumns with all ID columns mapped. |