title: How to store enum type as lowercase string?
body: <p>My model class (piece):</p>
  
  <pre class="lang-java prettyprint-override"><code>public class User ... {
  
      @Enumerated(STRING)
      private Status status;
  
      ...
  
      public enum Status {
  
          ACTIVE,
          INACTIVE;
  
          @Override
          public String toString() {
              return this.name().toLowerCase();
          }
      }
  
      ...
  
      public String getStatus() {
          return status.name().toLowerCase();
      }
  
      public void setStatus(Status status) {
          this.status = status;
      }
  }
  </code></pre>
  
  <p>As you see above I override toString method, but no effect.
  Enumeration store in database as <code>ACTIVE</code> or <code>INACTIVE</code>.</p>
  
  <p>P.S. I use hibernate jpa</p>
  
  <p>Thanks for help!</p>
  
  <p>P.S.S. I ask because I write REST service that produces json (in json object better use lower case, if I'm not mistake)</p>