I am creating a specification which returns the records for the ids provided by the db function GET_RECORD_IDS. I am providing my code snippet below-
return ((root, query, criteriaBuilder) -> criteriaBuilder.and(root.get("id").in(
criteriaBuilder.function("GET_RECORD_IDS", List.class, criteriaBuilder.literal(str))))
But this code results in the error set-returning functions are not allowed in WHERE. How do I make this work?