-
Notifications
You must be signed in to change notification settings - Fork 0
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] 영화 예매 취소하기 API 구현 #16
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
사실 내가 처음에 생각했던건 그냥 theaters에서 가져오는 방식이 맞아. 그런데 이게 합동세미나에서 하는거다보니 우리가 원하는대로 ERD가 안 나올 수밖에 없어. 원래대로면 표를 취소할 때 표만 가져오면 되는거니까 무비랑 직접 연관을 맺을 일이 없는데 이번에는 그런 형식이 아니라 영화 조회 페이지에서 취소되는 로직이라(표 뷰가 따로 없으니까) 일어난 일 같아. 그래서 네가 말한 두 방법 중 어느 방법으로 해도 앞으로의 프로젝트에서는 이런식으로 꼬이는 일이 발생하지는 않을 것 같아 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue 📌
Description ✔️
영화 예매 취소하기 api 구현
예매 취소하기를 눌렀을 때, 해당 영화의 모든 예매 내역을 삭제하도록 구현함
CGV-SERVER/src/main/java/org/sopt/cgv/domain/Ticket.java
Lines 11 to 33 in 50d6783
Ticket 엔티티를 구현하였는데, 영화 기본키 값을 넣기 위해서 Movie 엔티티와 연관관계를 설정하였더니 이행적 함수 종속(?) 형태가 되는 것 같아서.. 아래 그림처럼 erd가 좀 이상해.. (이거 이렇게 되면 안된다고 배웠던거 같은데..)
그래서 굳이 Movie랑 연관관계를 짓지 않고 기존의 theaters 속성으로 영화의 기본키 값을 불러올 수 있어서 코드를 위처럼 작성했는데 이 방법말고 그냥 Movie 엔티티랑 연관관계를 맺는게 더 나을까??