fix: Article 1+4N 문제 해결#2268
Conversation
# Conflicts: # src/main/java/in/koreatech/koin/domain/community/keyword/service/KeywordService.java
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 5 minutes and 51 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🔍 개요
select a1_0.id, a1_0.board_id, a1_0.content, a1_0.created_at, a1_0.hit, a1_0.is_deleted, a1_0.is_notice, a1_0.title, a1_0.updated_at from new_articles a1_0 where ( a1_0.is_deleted = ? ) and a1_0.id in ( ? )select k1_0.id, k1_0.article_id, k1_0.created_at, k1_0.is_deleted, k1_0.updated_at, k1_0.user_id from new_koin_articles k1_0 where k1_0.article_id = ? and ( k1_0.is_deleted = ? )select k1_0.id, k1_0.article_id, k1_0.author, k1_0.created_at, k1_0.is_deleted, k1_0.portal_hit, k1_0.portal_num, k1_0.registered_at, k1_0.updated_at, k1_0.url from new_koreatech_articles k1_0 where k1_0.article_id = ? and ( k1_0.is_deleted = ? )select l1_0.id, l1_0.article_id, l1_0.author_id, l1_0.category, l1_0.created_at, l1_0.found_at, l1_0.found_date, l1_0.found_place, l1_0.is_council, l1_0.is_deleted, l1_0.is_found, l1_0.type, l1_0.updated_at from lost_item_articles l1_0 where l1_0.article_id = ?select k1_0.id, k1_0.admin_id, k1_0.article_id, k1_0.created_at, k1_0.is_deleted, k1_0.updated_at from koin_notice k1_0 where k1_0.article_id = ? and ( k1_0.is_deleted = ? )new_articles과 new_koin_articles, new_koreatech_articles, lost_item_articles, koin_notice의 OneToOne 관계로 인해 발생하는 문제이다.
new_articles은 연관관계의 주인이 아니기 때문에 직접 참조하기 전까지는 연관 객체를 가지고 있는지 확인할 수 없다.
그렇기 때문에 Hibernate에서는 new_articles에서 LAZY로 설정했더라도 조회하는 시점에서 연관 객체를 즉시 로딩한다.
해당 문제를 개선한다.
close [공통] Article 1+4N 문제 해결 #2266
🚀 주요 변경 내용
-> DTO Project으로 Article를 조회하도록 수정
💬 참고 사항
✅ Checklist (완료 조건)