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

Scaffolding generates java.lang.Long for Ids

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 2.7.0.Final
    • 2.6.0.Final
    • Scaffold
    • None

      When I generate an Entity and then Scaffold the JSF web app, my Backing Beans have the following :

      private java.lang.Long id;
      
      public java.lang.Long get Id() {
       return this.id;
      }
      

      But in the previous release of Forge it used to be like that :

      private Long id;
      
      public Long get Id() {
       return this.id;
      }
      

      This is how to reproduce it :

      [Devoxx]$ project-new --named projlong
      [projlong]$ jpa-new-entity --named MyEntity
      [MyEntity.java]$ scaffold-generate --targets org.projlong.model.MyEntity
      [MyEntity.java]$ cd ../..
      [projlong]$ cd view/
      [view]$ more MyEntityBean.java
      
      @Named
      @Stateful
      @ConversationScoped
      public class MyEntityBean implements Serializable
      {
      
         private static final long serialVersionUID = 1L;
      
         /*
          * Support creating and retrieving MyEntity entities
          */
      
         private java.lang.Long id;
      
         public java.lang.Long getId()
         {
            return this.id;
         }
      
         public void setId(java.lang.Long id)
         {
            this.id = id;
         }
      

              rhn-support-ggastald George Gastaldi
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: