From c140739634d10b56c724cfcad82b7880fc6913f6 Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Mon, 29 Apr 2024 11:21:40 +0100 Subject: [PATCH] PI-2138 Add sequence to AdditionalIdentifier entity (#3692) --- .../justice/digital/hmpps/entity/AdditionalIdentifier.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/prison-identifier-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/entity/AdditionalIdentifier.kt b/projects/prison-identifier-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/entity/AdditionalIdentifier.kt index 5f9c50e2d..29f25f46e 100644 --- a/projects/prison-identifier-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/entity/AdditionalIdentifier.kt +++ b/projects/prison-identifier-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/entity/AdditionalIdentifier.kt @@ -13,6 +13,11 @@ import java.time.ZonedDateTime @Entity @EntityListeners(AuditingEntityListener::class) @SQLRestriction("soft_deleted = 0") +@SequenceGenerator( + name = "additional_identifier_id_seq", + sequenceName = "additional_identifier_id_seq", + allocationSize = 1 +) class AdditionalIdentifier( @Column(columnDefinition = "varchar2(30)") @@ -33,6 +38,7 @@ class AdditionalIdentifier( @Id @Column(name = "additional_identifier_id") + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "additional_identifier_id_seq") val id: Long = 0, @Version