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

Add A@Column(length) on Entity attributes of type String

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.4.1.Final, 2.0.0.Alpha13
    • None
    • None
    • None

    Description

      It would be good to be able to set the length of a string on an entity. If you do :

      field string --named title ;
      constraint Size --onProperty title --max 2000
      

      You will get :

      @Column
      @Size(max = 2000)
      private String title;
      

      Even in Java EE 7, the integration between JPA and Bean Validation hasn't been made. So this doesn't create a column in the DB with 2000 char long. What you would need is :

      @Column(length = 2000)
      @Size(max = 2000)
      private String title;
      

      It would be good to have extra length parameter, something like :

      field string --named title --length 2000;
      

      See : http://lists.jboss.org/pipermail/forge-dev/2012-December/002878.html

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: