Quantcast
Channel: AllInGeek.com » java
Viewing all articles
Browse latest Browse all 10

Note: JPA InheritanceType.JOINED

$
0
0

Hey, make sure to annotate child model classes with @PrimaryKeyJoinColumn when using InheritanceType.JOINED. This annotation allows you to specify the column names to be used in mapping parent child relationships.  Additional reading:

  1. API
  2. JEE 6 – Entity Inheritance Tutorial – fantastically incomplete

Its important to note that using this inheritance model requires an extra join operation when retrieving entities.  This may negatively impact performance if running high volume or with anything other than trivial inheritance models.


Viewing all articles
Browse latest Browse all 10

Trending Articles