aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-05-04 23:19:19 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2023-05-04 23:19:19 +0100
commitb49d38cc15ad20e660d0e4ebd8a6d6a06e6a2207 (patch)
treeb13eafe9d734edbed0ab7e992d8d0cb1680e30c7 /cps-ri/src
parent61e8551cf91c95844963f0e52cefddb6a7477d38 (diff)
Fragment Entity does not represent the correct relationship with Anchor
FragmentEntity incorrectly has OneToOne relationship to AnchorEntity, instead of ManyToOne. The reason this has not caused errors so far is that Liquibase is being used to generate database definition, not JPA. Issue-ID: CPS-863 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8d3c5dc19193a84fa59526de7f2cbab7ab20a8fc
Diffstat (limited to 'cps-ri/src')
-rwxr-xr-xcps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java b/cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java
index e696a4064a..62c8c19cb1 100755
--- a/cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java
@@ -34,7 +34,6 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
@@ -86,7 +85,7 @@ public class FragmentEntity implements Serializable {
@JoinColumn(name = "dataspace_id")
private DataspaceEntity dataspace;
- @OneToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "anchor_id")
@EqualsAndHashCode.Include
private AnchorEntity anchor;