title: Read ENUM and its fields from a database (JPA)
body: <p>I have a model object that's in fact an enum with fields and getters:</p>
  
  <pre><code>@Entity
  public enum Type {
     TYPE1, TYPE2, TYPE3, TYPE4;
  
     @Column
     private Long id;
     @Column
     private String name;
     ...
  
     public String getName() {
        return this.name;
     }
     ...
  }
  </code></pre>
  
  <p>It compiles and runs fine. However, if I call a getter method, it returns null (it doesn't load any values stored in the database). Is this the standard behavior? Is there a way to make JPA load them?</p>