Skip to content

Conversation

@yongjun0511
Copy link
Collaborator

No description provided.

@yongjun0511 yongjun0511 self-assigned this Sep 22, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @yongjun0511, 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은 Partnership 엔티티의 @where 어노테이션을 임시로 수정하는 핫픽스입니다. 기존에 start_date와 end_date를 모두 고려하던 조건에서 start_date 조건을 제거하여, 현재 날짜 이후에 종료되는 모든 파트너십이 올바르게 조회되도록 변경했습니다. 이는 특정 시나리오에서 파트너십 조회가 제대로 이루어지지 않던 문제를 해결하기 위한 임시 조치로 보입니다.

Highlights

  • @where 어노테이션 수정: Partnership 엔티티의 @where 어노테이션에서 'start_date <= CURRENT_DATE' 조건을 임시로 제거했습니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


버그가 나타나 코드 한 줄 고쳐내니 세상 평화로워

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. @Where 어노테이션의 조건을 수정하여 아직 시작되지 않은 제휴 정보도 조회할 수 있도록 변경하신 것을 확인했습니다. 이 변경은 hotfix의 목적에 부합하는 것으로 보입니다. 다만, @Where 어노테이션의 전역적인 특성으로 인해 발생할 수 있는 잠재적인 문제점과 장기적인 개선 방안에 대한 리뷰 의견을 남겼습니다. 제안된 내용을 검토해보시고, 추후 리팩토링 계획에 반영하시면 좋을 것 같습니다.

@Builder
@AllArgsConstructor
@Where(clause = "start_date <= CURRENT_DATE AND end_date >= CURRENT_DATE")
@Where(clause = "end_date >= CURRENT_DATE")

Choose a reason for hiding this comment

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

high

이 변경으로 인해 아직 시작되지 않은 제휴도 조회 결과에 포함되게 됩니다. 이는 의도된 동작으로 보입니다.

다만 @Where 어노테이션은 해당 엔티티에 대한 모든 조회 쿼리에 전역적으로 필터 조건을 추가하므로, 의도치 않은 부작용을 일으킬 수 있습니다. 예를 들어, 관리자가 만료된 제휴 정보를 조회하거나 수정해야 할 경우, @Where 조건 때문에 엔티티를 불러오지 못하는 문제가 발생할 수 있습니다.

장기적으로는 @Where를 사용하는 대신, 다음과 같은 방법을 고려해 보시는 것을 추천합니다:

  • 각각의 조회 요구사항에 맞는 별도의 리포지토리 메소드를 작성 (예: findActivePartnerships, findAllIncludingFuturePartnerships)
  • JPA Specification이나 QueryDSL을 사용하여 동적으로 쿼리 조건을 조합

추가적으로, 이 변경으로 인해 PartnershipRepositoryfindRestaurantsWithMyPartnerships 쿼리에 있는 p.endDate >= current_date 조건이 중복됩니다. @Where가 적용되므로 해당 쿼리 내의 조건은 제거해도 동일하게 동작할 것입니다. 이는 @Where가 코드베이스 전반에 미치는 영향을 보여주는 좋은 예시입니다.

이 수정이 임시 조치임을 감안할 때, 추후 리팩토링을 위한 이슈를 생성해두는 것도 좋은 방법입니다.

@yongjun0511 yongjun0511 merged commit 76a27b7 into main Sep 22, 2025
1 check passed
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