Nikita Timofeev created CAY-2754:
------------------------------------
Summary: 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
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)