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

feat : Shop 등록 & 조회 #95

Merged
merged 50 commits into from
Jan 13, 2024
Merged

feat : Shop 등록 & 조회 #95

merged 50 commits into from
Jan 13, 2024

Conversation

kkangh00n
Copy link
Collaborator

⛏ 작업 상세 내용

  • Member의 Shop 조회 기능 (MemberShopController, MemberShopService)
  • 필터링 조건 조회는 name, category, city만을 조건으로 이용
  • Owner의 Shop 등록 기능 (OwnerShopController, OwnerShopService)
  • Q클래스 gitignore

📝 작업 요약

☑️ 중점적으로 리뷰 할 부분

  • MemberShopControllerTest
  • OwnerShopControllerTest
  • MemberShopServiceTest
  • MemberShopServiceTest
  • ShopRepositoryTest

Copy link
Member

@dlswns2480 dlswns2480 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
예약시간과 매장을 양방향 매핑 하셨는데 이유가 있을까요?? 보니까 shop에서 예약시간을 가져다 쓰는 부분이 없는 것 같아서요!
그리고 매장의 예약시간이 필요하다면 매장아이디를 통해 예약시간을 가져올 수 있는데 양방향을 거신 이유가 궁금합니다😃 (양방향 걸린게 이곳뿐이라 질문 남깁니다!)

Copy link
Member

@hyun2371 hyun2371 left a comment

Choose a reason for hiding this comment

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

shop 등록,조회 로직 구현하느라 고생 많으셨습니다!

@kkangh00n
Copy link
Collaborator Author

고생하셨습니다! 예약시간과 매장을 양방향 매핑 하셨는데 이유가 있을까요?? 보니까 shop에서 예약시간을 가져다 쓰는 부분이 없는 것 같아서요! 그리고 매장의 예약시간이 필요하다면 매장아이디를 통해 예약시간을 가져올 수 있는데 양방향을 거신 이유가 궁금합니다😃 (양방향 걸린게 이곳뿐이라 질문 남깁니다!)

엇! Member가 예약을 할 때, Shop에서 ReservationTime을 같이 보여주어야 예약이 진행되어서, Shop을 가져올 때 fetchJoin으로 갖고오기 위해 양방향을 걸었습니다~!

@kkangh00n
Copy link
Collaborator Author

양방향 매핑에 대해서 질문을 많이 해주셨네요..!!
Member의 입장에서 예약을 진행할 때, Shop을 단건조회할 때는 ReservationTime을 필연적으로 불러와야합니다!
그때마다 Shop 조회 -> ReservationTime 조회 해서 쿼리 2방 날리는 것보다 양방향 & joinFetch를 통해 쿼리 1방으로 모두 불러오는 것이 낫다고 판단하였습니다!!

혹시나 제가 놓치고 있는 부분이나 틀린 부분이 있다면 말씀해주시면 감사하겠습니다!!

@dlswns2480
Copy link
Member

양방향 매핑에 대해서 질문을 많이 해주셨네요..!! Member의 입장에서 예약을 진행할 때, Shop을 단건조회할 때는 ReservationTime을 필연적으로 불러와야합니다! 그때마다 Shop 조회 -> ReservationTime 조회 해서 쿼리 2방 날리는 것보다 양방향 & joinFetch를 통해 쿼리 1방으로 모두 불러오는 것이 낫다고 판단하였습니다!!

혹시나 제가 놓치고 있는 부분이나 틀린 부분이 있다면 말씀해주시면 감사하겠습니다!!

아하 그런거라면 ReservationTime 측에 이미 Shop 참조가 걸려있는데 그 페치조인을 shop에서 할 필요 있을까요?? 이미 참조가 걸려있는 ReservationTime에서 가져와도 같은 결과가 나오는데 차라리 예약시간 레포에 의존하고 거기서 페치조인으로 매장,예약시간을 가져오는게 낫지 않나 싶습니다! 의견 주십쇼ㅎㅎ 😃 참고로 그 쿼리가 지금 예약시간 레포에 정의되어 있는 상태입니다!

@kkangh00n kkangh00n linked an issue Jan 12, 2024 that may be closed by this pull request
4 tasks
@kkangh00n kkangh00n merged commit 7edfca4 into dev Jan 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature : shop CRUD
3 participants