SóProvas


ID
2494747
Banca
FCM
Órgão
IF Baiano
Ano
2017
Provas
Disciplina
Engenharia de Software
Assuntos

Em uma aplicação desenvolvida sob o paradigma da orientação por objetos, é comum utilizar o recurso de herança entre classes. Em se tratando de classes Java persistentes, para trabalhar com herança entre classes, a API de JPA (Java Persistence API) NÃO fornece

Alternativas
Comentários
  • JPA and Hibernate support 4 inheritance strategies which map the domain objects to different table structures.

    Mapped Superclass: The mapped superclass strategy is the simplest approach to mapping an inheritance structure to database tables. It maps each concrete class to its own table.

    Table per Class: The table per class strategy is similar to the mapped superclass strategy. The main difference is that the superclass is now also an entity.

    Single Table: The single table strategy maps all entities of the inheritance structure to the same database table.

    Joined: The joined table approach maps each class of the inheritance hierarchy to its own database table. This sounds similar to the table per class strategy. But this time, also the abstract superclass Publication gets mapped to a database table.

     

    https://www.thoughts-on-java.org/complete-guide-inheritance-strategies-jpa-hibernate/

     

    Gabarito: c)