Skip to content

Commit ef41690

Browse files
authored
Merge pull request #84 from GD-YD/hotfix/scraped-post-delete
hotfix: 스크랩 된 Post 삭제시 실패하던 버그 픽스
2 parents 95511ea + f9c06be commit ef41690

File tree

1 file changed

+4
-0
lines changed
  • gd-yd-core/src/main/java/com/gdyd/gdydcore/domain/board

1 file changed

+4
-0
lines changed

gd-yd-core/src/main/java/com/gdyd/gdydcore/domain/board/Post.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.gdyd.gdydcore.domain.common.BaseTimeEntity;
44
import com.gdyd.gdydcore.domain.member.LikeList;
55
import com.gdyd.gdydcore.domain.member.Member;
6+
import com.gdyd.gdydcore.domain.member.ScrapList;
67
import com.gdyd.gdydcore.domain.report.Report;
78
import jakarta.persistence.*;
89
import lombok.*;
@@ -53,6 +54,9 @@ public class Post extends BaseTimeEntity {
5354
@OneToMany(fetch = FetchType.LAZY, mappedBy = "post", orphanRemoval = true)
5455
List<LikeList> likeLists = new ArrayList<>();
5556

57+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "post", orphanRemoval = true)
58+
List<ScrapList> scrapLists = new ArrayList<>();
59+
5660
@OneToMany(fetch = FetchType.LAZY, mappedBy = "post", orphanRemoval = true)
5761
List<Report> reports = new ArrayList<>();
5862

0 commit comments

Comments
 (0)