-
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.
[Refactor] 내 일정 상세 정보로 진입할 때 탈퇴한 멘토/멘티의 정보도 보여주도록 Native Query로 전환한다 (#…
…172) * feat: Mentor, Mentee getByIdWithNative 쿼리 * refactor: 내 일정 상세 정보 조회 멘토, 멘티 상태값 추가 - ACTIVE, INACTIVE, BAN * refactor: 내 일정 상세 정보 조회 UseCase 멘토, 멘티 Native Query 적용 * fix: 내 일정 상세 조회 멘토, 멘티 관련 언어 Native Query Fetching 적용 - Lazy Loading이 안되므로 직접 Fetching
- Loading branch information
Showing
15 changed files
with
357 additions
and
79 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
17 changes: 11 additions & 6 deletions
17
src/main/java/com/koddy/server/member/domain/repository/AvailableLanguageRepository.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,15 +1,20 @@ | ||
package com.koddy.server.member.domain.repository; | ||
|
||
import com.koddy.server.global.annotation.KoddyWritableTransactional; | ||
import com.koddy.server.member.domain.model.AvailableLanguage; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface AvailableLanguageRepository extends JpaRepository<AvailableLanguage, Long> { | ||
@KoddyWritableTransactional | ||
@Modifying | ||
@Query("DELETE FROM AvailableLanguage al WHERE al.member.id = :id") | ||
void deleteMemberLanguage(@Param("id") final long id); | ||
@Query( | ||
value = """ | ||
SELECT * | ||
FROM member_language | ||
WHERE member_id = :memberId | ||
""", | ||
nativeQuery = true | ||
) | ||
List<AvailableLanguage> findByMemberIdWithNative(@Param("memberId") final long memberId); | ||
} |
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
Oops, something went wrong.