You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/13 16:20:42 UTC
[jira] [Commented] (DELTASPIKE-1242) select distinct generates
wrong JPQL
[ https://issues.apache.org/jira/browse/DELTASPIKE-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967818#comment-15967818 ]
ASF subversion and git services commented on DELTASPIKE-1242:
-------------------------------------------------------------
Commit 4aa12e06536de2f5acc151844a9bdf26f7c28b49 in deltaspike's branch refs/heads/master from [~struberg]
[ https://git-wip-us.apache.org/repos/asf?p=deltaspike.git;h=4aa12e0 ]
DELTASPIKE-1242 only use CriteriaBuilder.select if 1 param
CriteriaBuilder.multiselect should only be used if multiple return values
are required. Using multiselect for everyting might cost performance and
trigger wrong execution paths in JPA providers.
> select distinct generates wrong JPQL
> ------------------------------------
>
> Key: DELTASPIKE-1242
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1242
> Project: DeltaSpike
> Issue Type: Bug
> Components: Data-Module
> Affects Versions: 1.7.2
> Reporter: Mark Struberg
> Assignee: Mark Struberg
>
> The Data module generateds brackets into a distinct JPQL statement
> Instead of
> {source}
> SELECT DISTINCT e.mycol from SomeEntity e
> {source}
> we currently generate:
> {source}
> SELECT DISTINCT(e.mycol) from SomeEntity e
> {source}
> But this is not correct according to the JPA spec. It also actually only works on Hibernate but fails on both EclipseLink (RI) and OpenJPA.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)