Skip to content

Commit

Permalink
feat: 페치 조인으로 n+1 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Doyeon04 committed May 10, 2024
1 parent 446d3d8 commit a6d716d
Showing 1 changed file with 1 addition and 1 deletion.
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 a6d716d

Please sign in to comment.