title: How to auto increment data on new record insertion
body: <p>I would like to add a user defined column which will auto increment on new record insertion, how should I do this? so that it runs on h2, mysql</p>
  
  <pre><code>@Entity public class Parent {
  
  @OneToMany List&lt;Child&gt; children;
  
  }
  
  @Entity public class Child {
      int sortOrder;
  }
  
  e.g. Parent1 has Child{1, 2, 3}
  Parent2 has {1, 2}
  </code></pre>
  
  <p>Note: Values within each Parent needs to be auto incremented not outside.</p>