title: Hibernate naming strategy
body: <p>I am building a REST webservice with Spring (Boot) and am trying to use hibernate as orm mapper without any xml configuration.</p>
  
  <p>I basically got it to work, but I am stuck with a configuration issue.
  I instantiate <code>LocalContainerEntityManagerFactoryBean</code> as <code>@Bean</code> in a @Configuration file.</p>
  
  <p>I set <code>hibernate.ejb.naming_strategy</code> as in the following example -> this seems to work for creating the tables if they do not exist (column names are camelCase like in my @Entity classes) but when a query is executed, hibernate "forgets" about this naming configuration and tries to use another kind of naming strategy with under_score_attributes --> obviously those queries fail. Is there any other property I need to set? </p>
  
  <p>Or another way of configuring the properties preferably <em>without</em> adding a <code>cfg.xml</code> or <code>persistence.xml</code>?</p>
  
  <pre><code>LocalContainerEntityManagerFactoryBean lef = new LocalContainerEntityManagerFactoryBean();   
  Properties props = new Properties();
  props.put("hibernate.hbm2ddl.auto", "create");
  props.put("hibernate.ejb.naming_strategy","org.hibernate.cfg.DefaultNamingStrategy");
  lef.setJpaProperties(props); 
  lef.afterPropertiesSet();
  </code></pre>