cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <>
Subject Fetching distinct related objects
Date Tue, 22 Sep 2015 14:36:49 GMT
Hi all,

I’m trying to retrieve a list of distinct related objects. If I execute an EJBQL-query that
looks like this…

"select distinct from Receipt receipt”

…where “shop” is a relationship on the “Receipt”-entity, I get an exception that
looks like this:
Doing the same fetch without the distinct keyword works fine (returns a list of Shop objects).
Also, performing a distinct fetch on attributes of “Shop” works fine, like so:

"select distinct from Receipt receipt”

Is this a bug or am I going around this the wrong way? How would you go about constructing
a fetch for distinct related objects?

- hugi

// Hugi Thordarson
// s. 895-6688
View raw message