Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #185 from FinFellows/feat/#143_setCookie
Browse files Browse the repository at this point in the history
[FIX]: cascade, 양방향 설정
  • Loading branch information
LEEJaeHyeok97 authored Jan 17, 2024
2 parents d520794 + c910fea commit 24bb61b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class EduContentBookmark extends BaseEntity {
// 금융 배우자 id
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "edu_content_id")
@OnDelete(action = OnDeleteAction.CASCADE)
private EduContent eduContent;

@Builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.finfellows.domain.educontent.domain;

import com.finfellows.domain.bookmark.domain.EduContentBookmark;
import com.finfellows.domain.common.BaseEntity;
import com.finfellows.domain.post.domain.ContentType;
import com.finfellows.domain.post.domain.Post;
Expand All @@ -10,6 +11,9 @@
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name = "EduContent")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand All @@ -30,6 +34,8 @@ public class EduContent extends BaseEntity {
@Column(name="contentType")
private ContentType contentType;

@OneToMany(mappedBy = "eduContent", cascade = CascadeType.ALL)
private List<EduContentBookmark> eduContentBookmarkList = new ArrayList<>();

@Column(name="title")
private String title;
Expand Down

0 comments on commit 24bb61b

Please sign in to comment.