Skip to content

Commit

Permalink
refactor: Add JoinColumn to comment (#10)
Browse files Browse the repository at this point in the history
- OneToMany만 있으면 중간 테이블 생성됩니다.
- Issue - Comment는 OneToMany로, Comment에 IssueId를 갖도록 함.
  • Loading branch information
kihyuk-sung committed Jun 15, 2021
1 parent 0b2d0f2 commit 3ab8a74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Comment {
@Column(columnDefinition = "BINARY(16)", name = "COMMENT_ID")
private UUID id;

@Column(name = "ISSUE_ID")
private Long issueId;

@ManyToOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class Issue {
private Milestone milestone;

@OneToMany
@JoinColumn(name = "ISSUE_ID")
private List<Comment> comments;

private Issue(User author, String title) {
Expand Down

0 comments on commit 3ab8a74

Please sign in to comment.