[
https://issues.apache.org/jira/browse/OPENJPA-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-3092.
--------------------------------------
Resolution: Fixed
Fixed in https://github.com/apache/openjpa/pull/318, thanks Paul.
> Criteria API set operations lose the projection of their first operand
> ----------------------------------------------------------------------
>
> Key: OPENJPA-3092
> URL: https://issues.apache.org/jira/browse/OPENJPA-3092
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Richard Zowalla
> Priority: Major
> Fix For: 4.3.0
>
>
> OPENJPA-3091 gives JPQL set operations (UNION, INTERSECT, EXCEPT) the
> projections, aliases and clauses of their first operand and sets distinct to
> false on the compound. Criteria set operations (CriteriaBuilder.union,
> unionAll, intersect, except) build their compound in
> CriteriaSelectImpl.getQueryExpressions() the same way the JPQL builder did
> before: without projections and with DISTINCT_AUTO. A union of
> CriteriaQuery<String> operands therefore probably still returns Object[] rows
> of length 1, and in-memory distinct processing may drop the duplicates of
> UNION ALL.
> Apply the same handling to the criteria compound, ideally through a helper
> shared with JPQLExpressionBuilder, and make the criteria set operation tests
> in TestTypesafeCriteria (criteriaUnion, criteriaUnionAll, criteriaIntersect,
> criteriaExcept) assert on the values instead of only on non-null results.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)