From c76cfb34442f398a8c9756c9ce3592b1f4519fed Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 15 Jun 2023 07:25:30 +0000 Subject: [PATCH 1/2] [PAGOPA-1035] update tables: removed relationship between iban_master and ica_binary_file --- pom.xml | 2 +- .../apiconfig/starter/entity/IbanMaster.java | 6 ------ .../starter/entity/IcaBinaryFile.java | 20 +++++++++++-------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 9d0eacc..ac277d7 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.api-config starter - 1.6.0 + 1.7.0 Starter module for projects related to Nodo dei Pagamenti configuration. diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java index 417e0b5..bbd7326 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java @@ -62,12 +62,6 @@ public enum IbanStatus { @EqualsAndHashCode.Exclude private Iban iban; - @ManyToOne(fetch = FetchType.EAGER, optional = false) - @JoinColumn(name = "FK_ICA_BINARY_FILE", nullable = false) - @ToString.Exclude - @EqualsAndHashCode.Exclude - private IcaBinaryFile icaBinaryFile; - @ToString.Exclude @OneToMany(fetch = FetchType.LAZY, mappedBy = "fkIbanMaster") @EqualsAndHashCode.Exclude diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java index ca1de26..aa02651 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java @@ -1,18 +1,23 @@ package it.gov.pagopa.apiconfig.starter.entity; -import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; -import lombok.*; + import org.springframework.data.annotation.Immutable; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + @Table(name = "ICA_BINARY_FILE") @Entity @Immutable @@ -32,6 +37,9 @@ public class IcaBinaryFile { allocationSize = 1) @Column(name = "OBJ_ID") private Long objId; + + @Column(name = "ID_DOMINIO", nullable = false) + private String idDominio; @Column(name = "FILE_CONTENT") @ToString.Exclude @@ -44,8 +52,4 @@ public class IcaBinaryFile { @Column(name = "FILE_SIZE", nullable = false) private Long fileSize; - @ToString.Exclude - @OneToMany(fetch = FetchType.LAZY, mappedBy = "fkIcaBinaryFile") - @EqualsAndHashCode.Exclude - private List ibanMasters; } From 74034e207e423138d67a1a37200ca520b9f99800 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 15 Jun 2023 07:25:30 +0000 Subject: [PATCH 2/2] [PAGOPA-1035] update tables: removed relationship between iban_master and ica_binary_file --- pom.xml | 2 +- .../apiconfig/starter/entity/IbanMaster.java | 9 --------- .../starter/entity/IcaBinaryFile.java | 20 +++++++++++-------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index 9d0eacc..ac277d7 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa.api-config starter - 1.6.0 + 1.7.0 Starter module for projects related to Nodo dei Pagamenti configuration. diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java index 417e0b5..eeb8206 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IbanMaster.java @@ -37,9 +37,6 @@ public enum IbanStatus { @Column(name = "FK_IBAN", nullable = false, insertable = false, updatable = false) private Long fkIban; - @Column(name = "FK_ICA_BINARY_FILE", nullable = false, insertable = false, updatable = false) - private Long fkIcaBinaryFile; - @Column(name = "STATE", nullable = false) @Enumerated(EnumType.STRING) private IbanStatus ibanStatus; @@ -62,12 +59,6 @@ public enum IbanStatus { @EqualsAndHashCode.Exclude private Iban iban; - @ManyToOne(fetch = FetchType.EAGER, optional = false) - @JoinColumn(name = "FK_ICA_BINARY_FILE", nullable = false) - @ToString.Exclude - @EqualsAndHashCode.Exclude - private IcaBinaryFile icaBinaryFile; - @ToString.Exclude @OneToMany(fetch = FetchType.LAZY, mappedBy = "fkIbanMaster") @EqualsAndHashCode.Exclude diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java index ca1de26..aa02651 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/IcaBinaryFile.java @@ -1,18 +1,23 @@ package it.gov.pagopa.apiconfig.starter.entity; -import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; -import lombok.*; + import org.springframework.data.annotation.Immutable; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + @Table(name = "ICA_BINARY_FILE") @Entity @Immutable @@ -32,6 +37,9 @@ public class IcaBinaryFile { allocationSize = 1) @Column(name = "OBJ_ID") private Long objId; + + @Column(name = "ID_DOMINIO", nullable = false) + private String idDominio; @Column(name = "FILE_CONTENT") @ToString.Exclude @@ -44,8 +52,4 @@ public class IcaBinaryFile { @Column(name = "FILE_SIZE", nullable = false) private Long fileSize; - @ToString.Exclude - @OneToMany(fetch = FetchType.LAZY, mappedBy = "fkIcaBinaryFile") - @EqualsAndHashCode.Exclude - private List ibanMasters; }