본문 바로가기

JAVA/JPA

Query DSL select count(distinct field) 처리하기

Projections.fields(해당클래스.class,
해당객체.해당필드.countDistinct().as("count")