I am looking to get all the IDs of all subscribers. this is my predicate:
public static Specification<User> userSubscribed(){ return new Specification<User>() { public Predicate toPredicate(Root<User> root, CriteriaQuery<?> query, CriteriaBuilder builder) { return builder.equal(root.get("status"), 1 ); } }; }
My repository, however, only allows count, findAll and findOne. Is there a way to get it to return a list of a specific field?
source share