Description
when using CriteriaBuilder#countDistinct(path.get(attribute));
we end up with the following Exception in OpenJPA:
org.apache.openjpa.persistence.ArgumentException: Failed to execute query "null". Check the query syntax for correctness. See nested exception for details.
at org.apache.deltaspike.data.impl.criteria.CriteriaTest.should_create_count_criteria(CriteriaTest.java:366)
Caused by: java.lang.Exception: java.lang.RuntimeException: Can not find constructor for "class java.lang.Long" with argument types "[class java.lang.Long]" to fill data.
The code to reproduce this is
criteriaBuilder.countDistinct(path.get(attribute));