1 Reply Latest reply on Sep 5, 2006 12:48 PM by snau2005

    Enum column real length = length * 4, when use @Enumerated(

    snau2005

      I have enum:
      public enum MyEnum { ValueOne, ValueTwo };

      I have entity with column:
      @Column(nullable = true, length=255)
      @Enumerated(EnumType.STRING) public MyEnum myEnum;

      Table in DB have colmun of size 1020 (varchar 1020), but I specified length = 255,
      if length = 80, then column varchar 320, if length 40 column 160.
      It seems than engine multiples length by 4.
      Why is so?