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

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


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

      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 :

      @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

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