Refactor Publication class to use JOINED inheritance strategy and IDENTITY generation type
This commit is contained in:
@@ -5,12 +5,12 @@ import jakarta.persistence.*;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
|
@Inheritance(strategy = InheritanceType.JOINED)
|
||||||
@DiscriminatorColumn
|
@DiscriminatorColumn
|
||||||
public abstract class Publication {
|
public abstract class Publication {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Column(nullable = false, length = 200)
|
@Column(nullable = false, length = 200)
|
||||||
|
|||||||
Reference in New Issue
Block a user