Skip to content

fix: sendKeywordNotification 메소드 1+4N 개선#2207

Closed
Soundbar91 wants to merge 4 commits intorefactor/2202-keyword-extractorfrom
fix/2206-search-article
Closed

fix: sendKeywordNotification 메소드 1+4N 개선#2207
Soundbar91 wants to merge 4 commits intorefactor/2202-keyword-extractorfrom
fix/2206-search-article

Conversation

@Soundbar91
Copy link
Copy Markdown
Collaborator

@Soundbar91 Soundbar91 commented Mar 30, 2026

🔍 개요


🚀 주요 변경 내용

1 + 4N 문제 개선

image
  • Article은 총 4개의 엔티티와 OneToOne 관계를 가지고 있으며, 연관관계의 주인
  • Article가 조회되는 시점에서 OneToOne 관계로 인해 연관 엔티티들도 조회하는 쿼리 발생
  • Fetch Join으로 모두 가져오는 방법과 DTO Projection 사용 방법 고민
  • 키워드 알림에서는 Article의 id와 title만 사용하기 때문에 Fetch Join을 통해 4개의 엔티티를 가져오는 건 불필요하다고 판단
  • DTO Projection을 적용하여 개선

💬 참고 사항


✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@Soundbar91 Soundbar91 self-assigned this Mar 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e91c19f-44bf-4f95-ab08-77a51cc21249

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2206-search-article

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 공통 백엔드 공통으로 작업할 이슈입니다. 버그 정상적으로 동작하지 않는 문제상황입니다. labels Mar 30, 2026
@Soundbar91 Soundbar91 marked this pull request as draft March 30, 2026 08:38
@Soundbar91 Soundbar91 closed this Apr 1, 2026
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.

1 participant