cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Disjoint by id
Date Mon, 14 Nov 2016 17:17:42 GMT
Hi Mark,

Yeah, doesn't look right. What version of Cayenne is this? And what is the relationship semantics?
Is this a regular to-one?

Andrus

> On Nov 14, 2016, at 6:02 PM, Mark Stobbe <markstobbe85@gmail.com> wrote:
> 
> Hi,
> 
> I was wondering if this is correct:
> 
> I am using an fetch limit for some queries, though I also need to make sure
> I add the prefetch rules to refresh the data. I read in the documentation
> that i should use DISJOINT_BY_ID_PREFETCH_SEMANTICS, so I did. Now when I
> look at the queries I am a little bit surprised because I see the same id
> occur many times. Shouldn't this be purged before building the query?
> 
> Example query would be:
> 
> SELECT t0.*
> FROM   djem_account t0
> WHERE  ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 217 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 )
>        OR ( t0.id = 219 );
> 
> Best regards,
> Mark Stobbe


Mime
View raw message