cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: ObjectSelect without DISTINCT
Date Thu, 22 Dec 2016 06:24:22 GMT
This is intentional. DISTINCT is automatically added by Cayenne to the generated SQL when it
detects a to-many in the qualifier. So I don't see a use case for an explicit DISTINCT API
(until we start supporting fetching individual columns via ObjectSelect, which we may).

Andrus
 

> On Dec 21, 2016, at 8:19 PM, Lon Varscsak <lon.varscsak@gmail.com> wrote:
> 
> Actually, this will lead me to a question.  While poking around in
> ObjectSelect it occurred to me that the chaining API doesn’t appear to have
> a “distinct” option.  If I were qualifying through a to-many relationship
> will ObjectSelect just do the right thing and use a DISTINCT?
> 
> -Lon
> 
> On Wed, Dec 21, 2016 at 10:17 AM, Lon Varscsak <lon.varscsak@gmail.com>
> wrote:
> 
>> Haha, yeah.  If only all problems solved themselves that way. :)
>> 
>> On Tue, Dec 20, 2016 at 11:00 PM, Andrus Adamchik <andrus@objectstyle.org>
>> wrote:
>> 
>>> Glad when the problems solve themselves by the time I finish reading a
>>> thread :)
>>> 
>>> Andrus
>>> 
>>>> On Dec 20, 2016, at 6:18 PM, Lon Varscsak <lon.varscsak@gmail.com>
>>> wrote:
>>>> 
>>>> And…turns out a problem in the model (to dependent PK missing). :P
>>>> 
>>>> On Tue, Dec 20, 2016 at 8:00 AM, Lon Varscsak <lon.varscsak@gmail.com>
>>>> wrote:
>>>> 
>>>>> Oops, I spoke too soon.  ObjectSelect isn’t my issue, it’s the firing
a
>>>>> to-one relationship…hmmm.
>>>>> 
>>>>> -Lon
>>>>> 
>>>>> On Tue, Dec 20, 2016 at 7:56 AM, Lon Varscsak <lon.varscsak@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> Hey guys, is there any way to do an ObjectSelect and specify to not
>>> use
>>>>>> “DISTINCT”?  I have tables that have blob columns and Sybase
doesn’t
>>> allow
>>>>>> distinct on them.
>>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> Lon
>>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
>> 


Mime
View raw message