Here's what we use for EXISTS queries with Cayenne: https://gist.github.com/maiksd/bd32e75968cbf0c76fb05a3c7d244e7c
Maik P.S. most of this is by Hugi > Am 31.07.2018 um 10:55 schrieb Andrus Adamchik <[email protected]>: > > I guess Cayenne needs an ability to use EXISTS query or something for to-many > conditions instead of a straight join with DISTINCT. > > Until then you'd probably have to do some in-memory condition checking, or > running the query from the other side of the relationship. > > Andrus > > >> On Jul 31, 2018, at 4:02 AM, Lon Varscsak <[email protected]> wrote: >> >> Hey all, >> >> I have an entity with a blob in it, but it has has to-many joins. When I >> go to do a join across these, I will no longer get a distinct set of data >> (because at least in Sybase, you can't 'distinct' a blob column). >> >> Any ideas on how to implement this so that the blob is lazy and/or in a >> different entity (without it actually being in a different table)? >> >> -Lon >
