title: JPA autoincrement non primary key column
body: <p>How can i auto increment a non primary column using annotations.</p>
  
  <p>I tried this but it is not working.</p>
  
  <pre><code>@Generated(value="GenerationTime.INSERT")
  @GenericGenerator(name="id", strategy="sequence")
  private Long id;
  </code></pre>
  
  <p>I am using mysql database</p>