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

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

    Kestas ruks Newbie

      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?