본문 바로가기
반응형

QueryDSL subQuery1

QueryDSL select절에 subQuery 조회 join 하고 중복된 데이터를 제거하기 위해 select절에 서브 쿼리를 작성한다 fun findWithdrawMember(): List { return queryFactory.select( QWithdrawMemberList( member.id, JPAExpressions.select(memberToken.ipAddress).from(memberToken).where(memberToken.id.eq(member.id)).orderBy( memberToken.id.desc()).limit(1), member.createdAt.stringValue(), member.updatedAt.stringValue() ) ).distinct().from(member).leftJoin(memberToken).disti.. 2022. 12. 13.
반응형