Skip to content

Commit

Permalink
fix: 삭제 시 user 는 남아있도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongh00 committed Aug 21, 2024
1 parent 01b5e55 commit 1f40d4a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class Friendship extends BaseEntity {
@Column(name = "friendship_id")
private Long id;

@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
private User user;

@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "friend_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
private User friend;

Expand All @@ -41,4 +41,3 @@ public void markAsMutual() {
this.isMutual = true;
}
}

0 comments on commit 1f40d4a

Please sign in to comment.