Add explicit @Column and @Table annotations for Serie and SeriePunkt entities to align with SQL schema, include @Id annotations in JPA entities, and resolve schema mapping warnings.
This commit is contained in:
+7
-5
@@ -7,12 +7,13 @@ import java.util.*
|
||||
@Table(name = "serien")
|
||||
class Serie(
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
val id: String = UUID.randomUUID().toString(),
|
||||
|
||||
@Column(nullable = false)
|
||||
@Column(name = "name", nullable = false)
|
||||
val name: String,
|
||||
|
||||
@Column
|
||||
@Column(name = "beschreibung")
|
||||
val beschreibung: String? = null,
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@@ -23,7 +24,7 @@ class Serie(
|
||||
val streichresultateCount: Int = 1,
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(nullable = false)
|
||||
@Column(name = "bindungstyp", nullable = false)
|
||||
val bindungstyp: Bindungstyp = Bindungstyp.PAAR_BINDUNG,
|
||||
|
||||
@ElementCollection
|
||||
@@ -67,6 +68,7 @@ enum class Bindungstyp {
|
||||
@Table(name = "serie_punkte")
|
||||
class SeriePunkt(
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
val id: String = UUID.randomUUID().toString(),
|
||||
|
||||
@Column(name = "serie_id", nullable = false)
|
||||
@@ -81,10 +83,10 @@ class SeriePunkt(
|
||||
@Column(name = "bewerb_id", nullable = false)
|
||||
val bewerbId: String,
|
||||
|
||||
@Column(nullable = false)
|
||||
@Column(name = "punkte", nullable = false)
|
||||
val punkte: Double,
|
||||
|
||||
@Column(nullable = false)
|
||||
@Column(name = "platzierung", nullable = false)
|
||||
val platzierung: Int
|
||||
) {
|
||||
fun copy(
|
||||
|
||||
Reference in New Issue
Block a user