Skip to content
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

[폐업추정] 어드민용 API 구현 #396

Open
wants to merge 4 commits into
base: jason/20240912-crawl-closed-place
Choose a base branch
from

Conversation

jyoo0515
Copy link
Member

@jyoo0515 jyoo0515 commented Oct 7, 2024

  • 어드민에서 필요한 리스트, 조회, 수정 api 구현

Checklist

  • 충분한 양의 자동화 테스트를 작성했는가?
    • 계단정복지도 서비스는 사이드 프로젝트로 진행되는 만큼 충분한 QA 없이 배포되는 경우가 많습니다. 따라서 자동화 테스트를 꼼꼼하게 작성하는 것이 서비스 품질을 유지하는 데 매우 중요합니다.

@jyoo0515 jyoo0515 requested a review from a team as a code owner October 7, 2024 14:38
Comment on lines +49 to +50
val placeIds = result.content.map { it.placeId }
val places = placeRepository.findAllByIdIn(placeIds)
Copy link
Member Author

Choose a reason for hiding this comment

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

ClosedPlaceCandidate 엔티티에 있는 placeId 필드를 Place 로 바꾸고 연관관계를 맺어도 되지만 아래와 같은 이유로 따로 조회하도록 했습니다

  1. Place 의 name 과 address 는 항상 필요해서 lazy loading 이 큰 의미가 없음.
  2. 그렇다고 ClosedPlaceCandidate 의 Place 를 eager loading 하자니 Place 가 Building 을 eager loading 함
  3. 이러면 ClosedPlaceCandidate 를 여러개 조회할 때 building 까지 join 해서 가져와야 함
  4. 이게 그냥은 안되고 3개의 테이블을 조인해서 native query 로 가져오거나 repository 메소드에 entitygraph + subgraph 로 처리해야 하는데 (ClosedPlaceCandidate 의 Place 의 빌딩을 가져오도록) 메소드가 복잡해지고 기술적인 맥락이 너무 많이지는 것 같아서 꺼려졌습니다

Copy link

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

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.

1 participant