Skip to content

Files

Latest commit

 

History

History

HibernateSpringBootJoinTableInheritance

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

JPA Inheritance - JOINED

Description: This application is a sample of JPA Join Table inheritance strategy (JOINED)

Key points:

  • this inheritance strategy can be employed via @Inheritance(strategy=InheritanceType.JOINED)
  • all the classes in an inheritance hierarchy (a.k.a., subclasses) are represented via individual tables
  • by default, subclass-tables contains a primary key column that acts as a foreign key as well - this foreign key references the base class table primary key
  • customizing this foreign key can be done by annotating the subclasses with @PrimaryKeyJoinColumn

If you need a deep dive into the performance recipes exposed in this repository then I am sure that you will love my book "Spring Boot Persistence Best Practices"If you need a hand of tips and illustrations of 100+ Java persistence performance issues then "Java Persistence Performance Illustrated Guide" is for you.