cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-2031) Fetching distinct related objects in EJBQL throws an exception
Date Wed, 23 Sep 2015 11:00:09 GMT

    [ https://issues.apache.org/jira/browse/CAY-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14904339#comment-14904339
] 

Andrus Adamchik commented on CAY-2031:
--------------------------------------

Also documenting a workaround - using an alias for the target entity:

"select distinct s from Receipt receipt inner join receipt.shop s”

> Fetching distinct related objects in EJBQL throws an exception
> --------------------------------------------------------------
>
>                 Key: CAY-2031
>                 URL: https://issues.apache.org/jira/browse/CAY-2031
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.0.M2
>         Environment: Java 1.8.0_45 running on OS X
>            Reporter: Hugi Thordarson
>
> Retrieving a list of distinct related objects in EJBQL using the following syntax fails:
> "select distinct receipt.shop from Receipt receipt”
> Stack trace:
> https://gist.github.com/hugith/c3f48c4576e6a55383b3
> Same query works fine without the "distinct" keyword.
> Same query works fine if you specify an attribute on "shop" (not just the related object).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message