-
Notifications
You must be signed in to change notification settings - Fork 8
커뮤니티 엔티티 정의 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
커뮤니티 엔티티 정의 #48
Conversation
nayonsoso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엔티티 잘 작성하셨네요!
그런데 전체적으로 파일 끝에 개행이 되어있지 않은데
개행 추가해주면 좋을 것 같아요~
https://hyeon9mak.github.io/github-no-newline-at-a-end-of-file/
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class Board { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 이것은 그냥 이전 코드에 대한 설명.. 반영하실 필요는 전혀 없습니다
빌더 패턴을 사용하셨네요! 지금 이전의 엔티티들을 보면 빌더 페턴을 사용하고 있지 않아서 이유를 말씀드려야 할 것 같아요.
저는 개인적으로 직접 생성자를 만들어주는 편이에요. 빌더 패턴은 인자를 명시적으로 전달할 수 있다는 점은 정말 편리하다고 생각하지만, 누락하는 인자가 있을 수 있다는 점이 치명적이라는 생각을 했어요. 그래서 이전 코드에서는 생성자를 만들어주었어요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당부분은 인지하고 있습니다!
추가적인 생성자를 생성하지않고, 유연하게 대처할 수 있어서 주로 사용하였는데,
추후 리팩토링 단계에서 추가적인 생성자 사용을 고려해보도록 하겠습니다.
| @DynamicUpdate | ||
| @DynamicInsert | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class Comment extends BaseEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
단순 궁금증
BaseEntity 클래스에 DynamicUpdate, DynamicInsert 어노테이션을 달아주지 않고, 그것을 상속하는 클래스에 달아준 이유가 있으신가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋ...큰 의도는 없었습니다..
BaseEntity를 상속하는 클래스들이 모두 DynamicUpdate, DynamicInsert 어노테이션을 필요로 할 것 같아서
해당 어노테이션 BaseEntity로 이동시켰습니다!
꼼꼼하게 확인해주셔서 감사합니다!
해당 링크 따라서 인텔리제이 설정하였고, 기존 파일에는 자동으로 개행이 추가되지는 않는 것 같더라구요,,? 일단 따로 추가하여 커밋하였습니다. |
nayonsoso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~~
((카톡 멘션 드렸어야 했는데 깜빡했네요🥲))
관련 이슈
작업 내용
특이 사항
게시글에서 fk로 들고있던 게시판 키가 board_id, bigint로 되어있어서

board_code, varchar(20)으로 수정하였습니다.
리뷰 요구사항 (선택)