This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Inheritence in JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Inheritence in JPA" Watch "Inheritence in JPA" New topic

Inheritence in JPA

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
Q1) I am confused with names? By how many names each one reffered?

1) Table per class hierarchy or Single table or Single Table Inheritance // Are these names are correct?Do they mean the same thing?
Data is store in one table.
lot of null able columns

2) Table per Subclass or Joined Inheritance
parent child relationship is established
No null able column

3) Table per class or table per concrete class

Each class has its own table
Parent fields get duplicated in table
Data gets repeated again and again

James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
Sounds about right.

For #3, no data is duplicated, only columns. Each instance is only stored in one of the tables.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
I agree. Here's the link:
subject: Inheritence in JPA
Similar Threads
Misleading Inheritance Model names - Java Beat questions
How To? Inheritance in Hibernate !
Help with a Mapping
polymormsim related demos
Best inheritance mapping strategy..