title: Can you save enums using an integer value instead of the EnumType.STRING or ORDINAL?
body: <p>I have a mysql table that I am storing the enumeration string value in.</p>
  
  <p>My model has the annotation:</p>
  
  <pre><code>@Enumerated(EnumType.STRING)
  </code></pre>
  
  <p>My enum looks like:</p>
  
  <pre><code>public enum SomeEnum {
  
     BLUE(0),
     YELLOW(1),
     RED(2),
  
     private int value;
  
     public SomeEnum(int value) {
       this.value = value;
     }
  
  }
  </code></pre>
  
  <p>I was hoping I could somehow store the integer 'value' of the enum in my database, and then somehow parse it back using the value to the enum again when hibernate loads my model into a java class.</p>
  
  <p>I don't want to use the ordinal value as that isn't stable enough.  And I don't want to use the mysql enum type either as it ties me into mysql for no good reason.</p>
  
  <p>So is this possible?</p>