In PostgreSQL, array_agg (column) allows to aggregate. I try to use it with JPA.
ParameterExpression param = criteriaBuilder.parameter(Integer