Advertisement

Inheritance and Custom Mapping

  • Joseph Ottinger
  • Srinivas Guruzu
  • Gary Mak
Chapter

Abstract

Inheritance, polymorphic associations, and polymorphic queries are supported by entities. The JPA specification says that both concrete and abstract classes can be entities and can be mapped with the Entity annotation. Non-entity classes and entity classes can extend each other. Hibernate provides the MappedSuperclass annotation (@MappedSuperclass) to enable inheritance mapping and to let you map abstract or concrete entity subclasses. The mapped superclass doesn't necessarily have its own separate table.

Keywords

Class Hierarchy Public Class Concrete Class Object Hierarchy Public Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Joseph Ottinger 2015

Authors and Affiliations

  • Joseph Ottinger
    • 1
  • Srinivas Guruzu
    • 1
  • Gary Mak
    • 1
  1. 1.NCUnited States

Personalised recommendations