Skip to content

Commit

Permalink
Merge pull request #82 from TeamViewMore/feat/#79-delete-evidence
Browse files Browse the repository at this point in the history
[FIX] EvidenceEntity에 ViolenceSegmentEntity 연관관계 설정
  • Loading branch information
7beunseo authored Aug 5, 2024
2 parents 4077562 + b42a206 commit 6907192
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/viewmore/poksin/entity/EvidenceEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Entity
Expand Down Expand Up @@ -53,4 +54,7 @@ public List<String> getFileUrls() throws JsonProcessingException {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "category_id")
private CategoryEntity category;

@OneToMany(mappedBy = "evidence", cascade = CascadeType.ALL, orphanRemoval = true)
private List<ViolenceSegmentEntity> violenceSegments = new ArrayList<>();
}

0 comments on commit 6907192

Please sign in to comment.