Skip to content

Commit

Permalink
[fix] #16 Cascade 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kmjenny committed Feb 14, 2024
1 parent 6735bba commit b71323c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/harang/server/domain/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Category {
@Column(name = "name", nullable = false)
private String name;

@OneToMany(mappedBy = "category")
@OneToMany(mappedBy = "category", cascade = CascadeType.ALL)
private List<PostCategory> postCategoryList = new ArrayList<>();

@Builder
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/harang/server/domain/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Help {
private String name;

/* Relation Parent Mapping */
@OneToMany(mappedBy = "help")
@OneToMany(mappedBy = "help", cascade = CascadeType.ALL)
private List<MemberHelp> memberHelpList = new ArrayList<>();

@Builder
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/harang/server/domain/MemberInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public class MemberInfo {
private String refreshToken;

/* Relation Parent Mapping */
@OneToMany(mappedBy = "memberInfo")
@OneToMany(mappedBy = "memberInfo", cascade = CascadeType.ALL)
private List<MemberHelp> memberHelpList = new ArrayList<>();

@OneToMany(mappedBy = "memberInfo")
@OneToMany(mappedBy = "memberInfo", cascade = CascadeType.ALL)
private List<Certification> certificationList = new ArrayList<>();

@Builder
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/harang/server/domain/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public class Post {
private Status status = Status.WAITING;

/* Relation Parent Mapping */
@OneToMany(mappedBy = "post", cascade = CascadeType.REMOVE)
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL)
private List<Matching> matchingList = new ArrayList<>();

@OneToMany(mappedBy = "post", cascade = CascadeType.REMOVE)
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL)
private List<PostCategory> postCategoryList = new ArrayList<>();

@Builder
Expand Down

0 comments on commit b71323c

Please sign in to comment.