Avoiding outer joins across tables when using joined inheritance with Spring Data JPA
问题 Consider the following classes in a Spring Data JPA (+ Hibernate) application: @Entity @Inheritance(strategy = InheritanceType.JOINED) @Table(name = "person") public class Person { } @Entity @Table(name = "customer") public class Customer extends Person { } @Entity @Table(name = "employee") public class Employee extends Person { } @Entity @Table(name = "manager") public class Manager extends Employee { } public interface IPersonRepository extends JpaRepository<Person, Long> { } public