강의

멘토링

커뮤니티

Inflearn Community Q&A

moretz2100630's profile image
moretz2100630

asked

Practice! Querydsl

querydsl로 where in 절 표현하기

Written on

·

13K

4

API 개발과 성능 최적화 강의 주문 조회 V5 JPA에서 DTO 직접 조회 - 컬렉션 조회 최적화 강의 를 보면서 

querydsl로 변환해 보는 공부를 하고 있습니다.

위의 코드에서 where in 절은 querydsl 로 어떻게 나타내야 하는지 궁금합니다 

JPAjava

Answer 2

14

yh님의 프로필 이미지
yh
Instructor

다음과 같이 사용하면 됩니다^^

List<Long> ids = Arrays.asList(1L, 2L);
List<Team> result = queryFactory
.selectFrom(team)
.where(team.id.in(ids))
.fetch();

0

Yong D님의 프로필 이미지
Yong D
Questioner

감사합니다

moretz2100630's profile image
moretz2100630

asked

Ask a question