From b42a206b0c7e5437f2709e3e5e1caad087a98f22 Mon Sep 17 00:00:00 2001 From: 7beunseo Date: Tue, 6 Aug 2024 02:55:56 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20EvidenceEntity=EC=97=90=20ViolenceSegme?= =?UTF-8?q?ntEntity=20=EC=97=B0=EA=B4=80=EA=B4=80=EA=B3=84=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20#79?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java b/src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java index 5e9fe96..4d3d305 100644 --- a/src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java +++ b/src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java @@ -9,6 +9,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; @Entity @@ -53,4 +54,7 @@ public List getFileUrls() throws JsonProcessingException { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "category_id") private CategoryEntity category; + + @OneToMany(mappedBy = "evidence", cascade = CascadeType.ALL, orphanRemoval = true) + private List violenceSegments = new ArrayList<>(); }