title: Hibernate 5.1.x naming Strategy (backward compatible with Hibernate 4.x)
body: <p>I'm using Spring Boot 1.3.3.RELEASE. By default Spring Boot uses the Hibernate Version 4.x. I'm trying to use new Hibernate i.e 5.1.0 FINAL (as of now).</p>
  
  <p>I'm using Gradle so to override the Hibernate Version I've added the following line</p>
  
  <pre><code>ext['hibernate.version']="5.1.0.Final"
  </code></pre>
  
  <p>followed the steps of <a href="https://stackoverflow.com/questions/34124140/springboot-1-3-0-support-hibernate-5/34131100">SpringBoot 1.3.0 support hibernate 5?</a></p>
  
  <p>I'm using following for naming Strategy</p>
  
  <pre><code>spring.jpa.properties.hibernate.naming.implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
  
  spring.jpa.properties.hibernate.naming.physical_strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
  </code></pre>
  
  <p>I've have a Entity class</p>
  
  <pre><code>@Entity
  public class AppUser {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @NotNull
      @Length(max = 100)
      private String username;
  
      @NotNull
      @Length(max = 100)
      private String firstName;
  
      @NotNull
      @Length(max = 100)
      private String lastName;
  
      @Length(max = 100)
      private String middleName;
  
      @NotNull
      @Length(max=100)
      private String email;
  
      @NotNull
      @Length(max = 100)
      private String password;
  
      @NotNull
      private boolean enabled;
  
  }
  </code></pre>
  
  <p>On Hibernate 4.x it executes the query</p>
  
  <pre><code>create table app_user (
          id bigint not null auto_increment,
          email varchar(100) not null,
          enabled bit not null,
          first_name varchar(100) not null,
          last_name varchar(100) not null,
          middle_name varchar(100),
          password varchar(100) not null,
          username varchar(100) not null,
          primary key (id)
      )
  </code></pre>
  
  <p>on 5.x it executed the query</p>
  
  <pre><code>create table AppUser (
          id bigint not null auto_increment,
          email varchar(100) not null,
          enabled bit not null,
          firstName varchar(100) not null,
          lastName varchar(100) not null,
          middleName varchar(100),
          password varchar(100) not null,
          username varchar(100) not null,
          primary key (id)
      )
  </code></pre>
  
  <p>How can I set the naming strategy such that Hibernate Uses 5.x underscore (as 4.x) on Table name and Column Name</p>