Skip to content

Commit

Permalink
�수거함 위도,경도 별 목록 조회 시 N+1 문제 해결 (#96)
Browse files Browse the repository at this point in the history
* chore: gitgnore .log 파일 추가

* feat: 페치 조인으로 n+1 문제 해결
  • Loading branch information
Doyeon04 authored May 13, 2024
1 parent 3848f54 commit 7664ed9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ out/

### VS Code ###
.vscode/

*.log
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public interface CollectingBoxRepository extends JpaRepository<CollectingBox, Long>, CollectingBoxRepositoryCustom {

@Query("select c from CollectingBox c join c.location l " +
@Query("select c from CollectingBox c join fetch c.location l " +
"where function('st_contains', function('st_buffer', :center, :radius), l.point) and " +
"c.tag in :tags")
List<CollectingBox> findAllWithinArea(@Param("center") Point center,
Expand Down

0 comments on commit 7664ed9

Please sign in to comment.