title: Spring + Hibernate - issue with @Table name annotation
body: <p>I am stuck on strange issue with Spring + Hibernate.</p>
  
  <p>I have some entity:</p>
  
  <pre><code>package arthur.khusnutdinov.mysitev2.pub.mods.db;
  // Generated 05.09.2017 23:23:19 by Hibernate Tools 5.2.5.Final
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import static javax.persistence.GenerationType.IDENTITY;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  /**
   * SitePages generated by hbm2java
   */
  @Entity
  @Table(name = "site_pages", catalog = "artfunpw")
  public class SitePages implements java.io.Serializable {
  
      private Integer id;
      private String pageUrl;
      private String pageHtmlContent;
  </code></pre>
  
  <p>And session configuration code:</p>
  
  <pre><code>@Bean
      public LocalSessionFactoryBean sessionFactory() {
  
          LocalSessionFactoryBean factoryBean = new LocalSessionFactoryBean();
          factoryBean.setDataSource(dbDataSource);
  
          Properties props = new Properties();
          props.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
          props.setProperty("hibernate.format_sql", "true");
          props.setProperty("hibernate.show_sql", "true");
  
          props.setProperty("net.sf.ehcache.configurationResourceName", "/ehcache.xml");
          props.setProperty("hibernate.cache.provider_class", "org.hibernate.cache.EhCacheProvider");
          props.setProperty("hibernate.cache.region.factory_class", "org.hibernate.cache.ehcache.EhCacheRegionFactory");
          props.setProperty("hibernate.cache.use_second_level_cache", "true");
          props.setProperty("hibernate.cache.use_query_cache", "true");
          factoryBean.setHibernateProperties(props);
          factoryBean.setPackagesToScan("arthur.khusnutdinov");
  
          return factoryBean;
      }
  </code></pre>
  
  <p>Everything works fine, untill table name in MySQL database is <strong>sitepages</strong>, but it doesn't work, if table name is <strong>site_pages</strong> - I've got java.sql.SQLSyntaxErrorException: Table 'artfunpw.sitepages' doesn't exist .
  It seems, like Hibernate is ignoring <code>@Table(name = "site_pages", catalog = "artfunpw")</code>.</p>
  
  <p>What am I doing wrong, how to make Hibernate to respect @Table annotation? </p>
  
  <p>Thank you very much!</p>
  
  <p><strong>Update 1</strong>:
  Tried to add </p>
  
  <pre><code>spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
  </code></pre>
  
  <p>into the <strong>application.properties</strong> - didn't helped.</p>
  
  <p><code>hibernate.implicit_naming_strategy</code> is not solved issue too.</p>
  
  <p><strong>Update 2</strong>: I use hibernate 5 :).</p>