Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2057

Attributes of Mapped Superclass should be protected and not private

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • 3.x Future
    • 2.12.0.Final
    • Java EE
    • None

    Description

      When creating a new Mapped Superclass, attributes are private. So the following command :

      jpa-new-mapped-superclass --named Person ;
      jpa-new-field --named firstName --length 50 --columnName first_name ;
      

      Will generate :

      @MappedSuperclass
      public class Person {
      
         @Column(length = 50, name = "first_name")
         private String firstName;
         ...
      }
      

      Because mapped superclass are to be inherited, it would be better to have protected attributes so subclasses could use the attributes

      @MappedSuperclass
      public class Person {
      
         @Column(length = 50, name = "first_name")
         protected String firstName;
         ...
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: