You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2017/02/16 09:54:42 UTC

[jira] [Commented] (CAY-2231) Support for collections in new functional expressions

    [ https://issues.apache.org/jira/browse/CAY-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15869652#comment-15869652 ] 

Nikita Timofeev commented on CAY-2231:
--------------------------------------

And old math expressions (like add, bitwise ops) should support collections too.

> Support for collections in new functional expressions
> -----------------------------------------------------
>
>                 Key: CAY-2231
>                 URL: https://issues.apache.org/jira/browse/CAY-2231
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>             Fix For: 4.0.M5
>
>
> New functional expressions doesn't work with ToMany collections.
> For example this will fail with ExpressionException:
> {code}
> Expression exp = Artist.PAINTING_ARRAY
>      .dot(Painting.PAINTING_TITLE)
>      .substring(1, 1)
>      .getExpression();
>         
> Artist artist = ObjectSelect.query(Artist.class)
>      .orderBy("db:ARTIST_ID")
>      .selectFirst(context);
> Object res = exp.evaluate(artist);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)