Skip to content

Commit

Permalink
[fix] entity cascade 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Nov 20, 2023
1 parent 608f44f commit f5c01d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class UserFirebaseToken extends BaseEntity{
private String token;

@NotNull
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@OnDelete(action = OnDeleteAction.CASCADE)
@ManyToOne(fetch = FetchType.LAZY, optional = false, cascade = CascadeType.REMOVE)
@JoinColumn(name = "user_id", nullable = false)
private User user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class UserMotivation extends BaseEntity{
private User user;

@NotNull
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@OnDelete(action = OnDeleteAction.CASCADE)
@ManyToOne(fetch = FetchType.LAZY, optional = false, cascade = CascadeType.REMOVE)
@JoinColumn(name = "motivation_id", nullable = false)
private Motivation motivation;

Expand Down

0 comments on commit f5c01d2

Please sign in to comment.