-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: region null 문제 해결을 위해 스프링데이터JPA로 변경
- Loading branch information
1 parent
6702702
commit e267c0a
Showing
12 changed files
with
97 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/main/java/team_alcoholic/jumo_server/domain/meeting/repository/JpaMeetingRepository.java
This file was deleted.
Oops, something went wrong.
21 changes: 15 additions & 6 deletions
21
src/main/java/team_alcoholic/jumo_server/domain/meeting/repository/MeetingRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
package team_alcoholic.jumo_server.domain.meeting.repository; | ||
|
||
import team_alcoholic.jumo_server.domain.meeting.dto.MeetingDto; | ||
import team_alcoholic.jumo_server.domain.meeting.dto.MeetingListDto; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.EntityGraph; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import team_alcoholic.jumo_server.domain.meeting.domain.Meeting; | ||
|
||
|
||
import java.util.List; | ||
|
||
public interface MeetingRepository { | ||
MeetingDto findMeetingById(Long id); | ||
List<MeetingListDto> findLatestMeetingList(int limit); | ||
List<MeetingListDto> findLatestMeetingListById(int limit, Long cursor); | ||
public interface MeetingRepository extends JpaRepository<Meeting, Long> { | ||
|
||
// 특정 ID의 Meeting 조회 | ||
@EntityGraph(attributePaths = "images") | ||
Meeting findMeetingById(Long id); | ||
|
||
// 특정 ID보다 작은 Meeting 목록 조회 | ||
// n+1 문제 해결을 위해 EntityGraph 사용 | ||
@EntityGraph(attributePaths = "region") | ||
List<Meeting> findByIdLessThanOrderByIdDesc(Long cursor, Pageable pageable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.