SQL INNER JOIN – A Beginner’s Guide

Introduction In this article, we are going to see how the INNER JOIN works in SQL, and how you can use it to associate rows belonging to different tables and build compound result sets.

How to JOIN unrelated entities with JPA and Hibernate

Introduction Answering questions on the Hibernate forum is a neverending source of inspiration. The following question is about joining unrelated entities using entity queries, and this post is going to explain how you can do it when using JPA and Hibernate.

How to customize an entity association JOIN ON clause with Hibernate @JoinFormula

Introduction As I explained in this previous article, you can map calculated properties using Hibernate @Formula, and the value is generated at query time. In this post, you’ll see how you can use a custom SQL fragment to customize the JOIN relationship between two entities, or an entity and a collection of embeddable types.