@Override
public final Page<T> findAll(Predicate predicate, Pageable pageable, List<String> fetchFields) {
if (fetchFields == null || fetchFields.isEmpty()) {
return super.findAll(predicate, pageable);
}
JPQLQuery fetchQuery = createQuery(predicate);
for (String fetchField : fetchFields) {
fetchQuery.leftJoin(builder.get(fetchField)).fetch();
}
JPQLQuery query = querydsl.applyPagination(pageable, fetchQuery);
return new PageImpl<T>(query.list(path), pageable, createQuery(predicate).count());
}