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 2022/08/16 08:10:00 UTC

[jira] [Closed] (CAY-2754) Add SELF property to the cgen templates

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

Nikita Timofeev closed CAY-2754.
--------------------------------
    Resolution: Fixed

https://github.com/apache/cayenne/commit/72b5a62544fa2d9f80a2620d3a43734b9045bfd6

> Add SELF property to the cgen templates
> ---------------------------------------
>
>                 Key: CAY-2754
>                 URL: https://issues.apache.org/jira/browse/CAY-2754
>             Project: Cayenne
>          Issue Type: Task
>          Components: cgen
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.3.M1
>
>
> We got properties that reflect full entity, but they are created only via API: {{PropertyFacotry.createSelf(Entity.class)}}
> It could be useful to add these properties by default to the generated class.
> Example:
> {code:java}
> public static final EntityProperty<Artist> SELF = PropertyFactory.createSelf(Artist.class);
> {code}
> And here's a query example:
> {code:java}
> ObjectSelect.query(Artist.class)
>                 .columns(Artist.SELF, Artist.PAINTING_ARRAY.count())
>                 .select(context);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)