Skip to content

Commit

Permalink
feat: GroupMember 조회 쿼리 개선 (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
ywonchae1 committed Nov 22, 2024
1 parent 29eb5f4 commit e7f0b53
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.ioteatime.meonghanyangserver.groupmember.repository;

import static org.ioteatime.meonghanyangserver.groupmember.doamin.QGroupMemberEntity.groupMemberEntity;
import static org.ioteatime.meonghanyangserver.member.domain.QMemberEntity.memberEntity;

import com.querydsl.core.types.Projections;
import com.querydsl.jpa.impl.JPAQueryFactory;
Expand Down Expand Up @@ -97,6 +98,8 @@ public Optional<GroupMemberEntity> findByGroupIdAndMemberId(Long groupId, Long m
return Optional.ofNullable(
jpaQueryFactory
.selectFrom(groupMemberEntity)
.join(groupMemberEntity.member, memberEntity)
.fetchJoin()
.where(
groupMemberEntity
.group
Expand Down

0 comments on commit e7f0b53

Please sign in to comment.