title: Hibernate, id, oracle, sequence
body: <p>My database is Oracle, and my id column value is an Oracle sequence, this sequence is executed by a trigger, so, before each row is inserted this trigger use this sequence to get the id value. So I am confused in which id strategy generation should I define in my entity class.</p>
  
  <pre><code>@GenericGenerator(name = "generator", strategy = "increment")
  @Id
  @GeneratedValue(generator = "generator")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
  @SequenceGenerator(name="idGenerator", sequenceName="ID_SEQ")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  </code></pre>
  
  <p>Really confused, Could someone shed some light on this subject? Please explain clearly..</p>