title: How to make Hibernate to use SequenceHiLoGenerator for JPA GenerationType.AUTO on Oracle?
body: <p>I have a table with id like below, but hibernate uses org.hibernate.id.SequenceGenerator instead of SequenceHiLoGenerator for GenerationType.AUTO, how can I tell hibernate to use SequenceHiLoGenerator?</p>
  
  <pre><code>@Id
  @SequenceGenerator(name="admin_seq", sequenceName="unique_id")
  @GeneratedValue(strategy=GenerationType.AUTO, generator="admin_seq")
  private Long id
  </code></pre>
  
  <p>If I use GenerationType.SEQUENCE, hibernate will use SequenceHiLoGenerator, but I need to use GenerationType.AUTO for compatibility with MySQL.</p>
  
  <p>I have tried using @GenericGenerator, it works for Oracle but will be complained by MySQL: org.hibernate.dialect.MySQLDialect does not support sequences. </p>
  
  <pre><code>@GenericGenerator(name = "admin_seq", strategy = "org.hibernate.id.SequenceHiLoGenerator",
          parameters = {
                  @Parameter(name = "sequence", value = "unique_id"),
                  @Parameter(name = "max_lo", value = "50") })
  @GeneratedValue(strategy=GenerationType.AUTO, generator="admin_seq")
  private Long id
  </code></pre>
  
  <p>I also tried using SequenceStyleGenerator by setting hibernate.id.new_generator_mappings=true in hibernate properties. It doesn't work either.</p>