title: java how to set an auto increment attribute
body: <p>In my entity I have this code:</p>
  
  <pre><code>@Entity
  @Table(name = "product")
  class Product{   
  ...
      @GeneratedValue(strategy=GenerationType.AUTO)
      int rank;
  }
  </code></pre>
  
  <p>When I try to save an object of type product, in DB, the rank value remains always 0</p>
  
  <p>Can I set an attribute other than the id auto-increment?</p>