| Isn't this already solved as described? I've just implemented a case that looks almost exactly like described here: https://vladmihalcea.com/the-best-way-to-map-a-onetoone-relationship-with-jpa-and-hibernate/ From this blog post, I've taken the "Post" class from the section "Typical mapping" and the "PostDetail" class from the section "The most efficient mapping". This means I now have a bidirectional OneToOne association where the child (PostDetail) uses MapsId. Now, when I am loading a Post via Session.get(Post.class, 1), I can see (with show_sql=true) that the PostDetail is lazily loaded, only when calling Post.getDetails().getCreatedOn(). So, as far as I understand this issue, it seems to me like the wanted behaviour is already present, at least since Hibernate 5.4.0. I didn't check earlier versions. |