[Fix] 회원탈퇴 시 course_difficulty_feedbacks FK 제약 위반 500 에러 수정#168
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 본 PR은 회원 탈퇴 과정에서 발생하는 외래 키 제약 조건 위반 문제를 해결합니다. 기존에는 hiking_records를 삭제할 때 참조 관계에 있는 course_difficulty_feedbacks가 먼저 처리되지 않아 서버 오류가 발생했습니다. 이를 해결하기 위해 삭제 순서를 조정하고 관련 레포지토리 메서드를 추가하여 데이터 무결성을 확보했습니다. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds functionality to delete a user's course difficulty feedback records during the user withdrawal process. It introduces new deletion methods in CourseDifficultyFeedbackRepository, integrates them into UserService, and updates the corresponding unit tests. The review feedback recommends optimizing these deletion methods using @Modifying and @Query to perform bulk deletes, preventing potential performance issues caused by Spring Data JPA's default select-before-delete behavior.
🧾 요약
🔗 이슈
✨ 변경 내용
UserService탈퇴 로직에course_difficulty_feedbacks삭제 순서 추가 —hiking_records삭제 전에 선행 처리CourseDifficultyFeedbackRepository에deleteByUser_Id,deleteByHikingRecord_IdIn메서드 추가UserServiceTest에 삭제 순서 InOrder 검증 추가✅ 확인