Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2754

Add SELF property to the cgen templates

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0-M1
    • cgen
    • None

    Description

      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:

      public static final EntityProperty<Artist> SELF = PropertyFactory.createSelf(Artist.class);
      

      And here's a query example:

      ObjectSelect.query(Artist.class)
                      .columns(Artist.SELF, Artist.PAINTING_ARRAY.count())
                      .select(context);
      

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            ntimofeev Nikita Timofeev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: