No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
Contrôle de l’héritage avec JPA
2026-10-01
@Inheritance permet de spécifier la stratégie d’héritage à utiliser pour une hiérarchie de classes.Figure 1: La hiérarchie des personnes
Table unique (Single table) : - Toutes les classes sont mappées à une seule table. - @Inheritance(strategy = InheritanceType.SINGLE_TABLE).
No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
@Inheritance(strategy = InheritanceType.JOINED).@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS).No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
No JDBC connection available. Set system properties 'jdbc.url' (and optionally 'jdbc.user'/'jdbc.password'), or provide a Connection in the kernel environment.
@SuperBuilder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@Setter
@ToString(callSuper = true)
@Entity(name="StudentHeritage2")
@Table(name="STUDENT", schema = "EX_HERITAGE2")
public class Student extends Person {
public enum Status {ACTIVE, ALUMNI}
@Column(nullable = false)
private Status status;
}@JOINED privilégie la normalisation des données en utilisant une table commune pour les propriétés partagées.@TABLE_PER_CLASS favorise l’indépendance des tables pour chaque classe.E. Bruno - L’héritage avec Jakarta Persistence