Skip to content
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

Entity 세팅 #11

Merged
merged 29 commits into from
Nov 20, 2023
Merged

Entity 세팅 #11

merged 29 commits into from
Nov 20, 2023

Conversation

oownahcohc
Copy link

@oownahcohc oownahcohc self-assigned this Nov 18, 2023
Copy link
Author

@oownahcohc oownahcohc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확실하지 않은 부분에 코멘트 남겨뒀어요! 🙂

@oownahcohc oownahcohc added this to the 2023-11-26 milestone Nov 18, 2023
Copy link
Contributor

@daehwan2da daehwan2da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 전체적으로 기본 생성자를 protected 로 제한하셨는데 이유가 있으실까요? (private 으로 하는건 어떠실까요~?)
  • BaseEntity 만들어서 AuditingEntityListener 상속하면 좋을것같습니다 😄

@oownahcohc
Copy link
Author

  • 전체적으로 기본 생성자를 protected 로 제한하셨는데 이유가 있으실까요? (private 으로 하는건 어떠실까요~?)

@Entity 로 매핑된 객체 조회를 할때 리플랙션을 이용하기 때문에 private 으로 기본 생성자를 만들면 접근을 못하는 걸로 알고있었거든요!!
혹시 제가 잘못 알고 있는 걸까요?!

  • BaseEntity 만들어서 AuditingEntityListener 상속하면 좋을것같습니다 😄

모든 엔티티에 사용될 것 같지 않아서 별개로 적용했는데, BaseEntity 로 만들어서 상속하는게 관리가 더 편할까요?!

@daehwan2da
Copy link
Contributor

@entity 로 매핑된 객체 조회를 할때 리플랙션을 이용하기 때문에 private 으로 기본 생성자를 만들면 접근을 못하는 걸로 알고있었거든요!!
혹시 제가 잘못 알고 있는 걸까요?!

오.. 맞네요..! 확인 감사합니다 :)

모든 엔티티에 사용될 것 같지 않아서 별개로 적용했는데, BaseEntity 로 만들어서 상속하는게 관리가 더 편할까요?!

음 일괄적으로 적용할 수 있을것같아서요, createdAt, updatedAt 이 적용되어지는 엔티티들에 대해서는 모두 적용하면 좋을것같습니다~!

@oownahcohc oownahcohc merged commit 1fefc67 into base/20231126 Nov 20, 2023
@oownahcohc oownahcohc deleted the feature/issue/7 branch November 20, 2023 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants