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] [Updated] (CAY-2526) Dynamic join at query time in ObjectSelect
Date Mon, 26 Aug 2019 13:01:00 GMT

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

Nikita Timofeev updated CAY-2526:
---------------------------------
    Fix Version/s:     (was: 4.2.M1)
                   4.2.M2

> Dynamic join at query time in ObjectSelect
> ------------------------------------------
>
>                 Key: CAY-2526
>                 URL: https://issues.apache.org/jira/browse/CAY-2526
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library, Database integration
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2.M2
>
>
> For complex queries there is a need to join tables that are not directly linked with
root via relationship.
>  Currently this can be done only in raw SQL queries (like {{SQLTemplate}}).
> We can introduce support for that in {{ObjectSelect}}.
> API can look something like this (we probably need some improvements in {{Property}}
API as well):
> {code:java}
> StringProperty<String> paintingTitle = PropertyFactory.createString("p.paintingTitle",
String.class);
> ObjectSelect
>     .columnQuery(Artist.class, Artist.ARTIST_NAME, paintingTitle)
>     .join(Painting.class, "p", Artist.ARTIST_NAME.length().eq(paintingTitle.length()))
>     .select(context);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message