0
我在我的應用程序中使用繼承概念。liquibase變更集的繼承
的父類:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "NATURE_PERSONNE", discriminatorType = DiscriminatorType.STRING, length = 4)
@Table(name = "PERSONNE")
public class Personne extends AuditingEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private Long id;
@Column(name = "NOM")
private String nom;
@Column(name = "PRENOM")
private String prenom;
...
}
的子類:
@Entity
@DiscriminatorValue("EMPL")
public class Employeur extends Personne {
@Column(name = "DATE_DEBUT_TRAVAIL")
private LocalDate dateDebutTravail;
@Column(name = "EMPLOI")
private String emploi;
....
}
是否有Liquibase創建繼承結構的可能性。它怎麼樣?
謝謝。
非常感謝你的答案dpr。 – jam