Subqueries in select in eclipselink
问题 According to EclipseLink documentation it supports subqueries in the select clause (even if JPA doesn't require it). When I try to use this feature in JPA Criteria API: myCriteriaQuery .multiselect(Arrays.asList(mySubquery, ...)) .where(...) there is an error: java.lang.ClassCastException: org.eclipse.persistence.internal.jpa.querydef.SubQueryImpl cannot be cast to org.eclipse.persistence.internal.jpa.querydef.SelectionImpl at org.eclipse.persistence.internal.jpa.querydef.CriteriaQueryImpl