Skip to content

Commit

Permalink
refact: delete table change
Browse files Browse the repository at this point in the history
  • Loading branch information
windeer9 committed Jan 24, 2024
1 parent 5d55afd commit 23f06ff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Calendar {
@ElementCollection
private List<LocalDate> stampedDates;

@OneToOne
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "user_id")
private User user;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public class Comment {
@Column(name = "created_at")
private LocalDateTime createdAt;

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

@ManyToOne
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "post_id")
private Post post;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Vote {
@Column
private String voteType;

@OneToOne
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "post_id")
private Post post;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public class VoteUser {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long voteUserId;

@ManyToOne
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "user_id")
private User user;

@ManyToOne
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "vote_id")
private Vote vote;

Expand Down

0 comments on commit 23f06ff

Please sign in to comment.