title: Is this a right approach to use Enum to persist it in database?
body: <p>So, I have a class(an entity) which has OneToMany relationship with an enum (another entity)</p>
  
  <pre><code>@Entity
  class MyClass {
      @Id
      int id;
  
      @OneToMany
      List&lt;MyEnumWrapper&gt; myEnum;
  }
  
  public enum MyEnum {
      VALUE1,
      VALUE2
      ;
  }
  
  @Entity
  public class MyEnumWrapper {
      @Id
      private String value;
  
      public MyEnumWrapper(MyEnum value){
             this.value = value
      }
  
      public MyEnum getValue {
             return MyEnum.valueOf(value);
      }
  }
  </code></pre>
  
  <p>Does wrapping the enum just to make a different table for it in the database makes sense ?</p>
  
  <p>EDIT: I get the problems with this design. But, my requirement is to have a separate table for the enum as it will get associated with many entities. So, is there a standard way to make table of just an Enum ?</p>