Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[인태영/봉구] 토이프로젝트 domain 생성 #15

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ity0526
Copy link
Contributor

@ity0526 ity0526 commented May 19, 2024

지금까지 pr하지 않았던 내용들까지 전부 올라가버렸습니다...
ity0526/hongikhospital 경로에 있는 도메인만 보시면 될 것 같습니다!!

Copy link
Member

Choose a reason for hiding this comment

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

XToOne은 기본적으로 fetchType이 EAGER가 기본 속성이라 LAZY로 수정하고 영속화를 위해서 연관관계에 있는 엔티티를 모두 persist해줄 필요 없게 cascade 속성도 추가해주시면 좋을듯!
@ManyToOne(fetch = LAZY,cascade = CascadeType.ALL) 이런식으로 수정해주시면 될 것 같아용

Copy link
Member

Choose a reason for hiding this comment

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

우리가 전에 같이 풀었던 퀴즈 문제처럼 @PersistenceContext 말고 @RequiredArgsConstructor&final 사용해주면 좋을듯!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants