cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAY-2553) Wrong disjoint prefetch query qualifier
Date Wed, 13 Mar 2019 08:07:00 GMT

     [ https://issues.apache.org/jira/browse/CAY-2553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikita Timofeev reassigned CAY-2553:
------------------------------------

    Assignee: Nikita Timofeev

> Wrong disjoint prefetch query qualifier
> ---------------------------------------
>
>                 Key: CAY-2553
>                 URL: https://issues.apache.org/jira/browse/CAY-2553
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.0.1, 4.1.B1
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.0.2, 4.1.B2, 4.2.M1
>
>
> For query like this:
> {code}
> List<Painting> result = ObjectSelect.query(Painting.class)
>   .where(Painting.TO_ARTIST
>     .dot(Artist.PAINTING_ARRAY)
>     .dot(Painting.PAINTING_TITLE).like("p1%"))
>   .and(Painting.PAINTING_TITLE.like("p2%"))
>   .prefetch(Painting.TO_ARTIST.disjoint())
>   .select(context);
> {code}
> We got prefetch query with wrong qualifier (main query is ok):
> {code}
> SELECT 
>     DISTINCT RTRIM(t0.ARTIST_NAME), t0.DATE_OF_BIRTH, t0.ARTIST_ID 
> FROM 
>     ARTIST t0 
>     JOIN PAINTING t1 ON t0.ARTIST_ID = t1.ARTIST_ID 
> WHERE 
>     t1.PAINTING_TITLE LIKE ? AND t1.PAINTING_TITLE LIKE ? 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message