title: How to set default schema name for Spring Data JPA queries?
body: <p>I want to set default schema for postgresql. When I try to set property("hibernate.default_schema") and also update table anotation with schema prop, hibernate still generates query without any schema name like below;</p>
  
  <pre><code>select log0_.id as id1_0_ from log log0_
  </code></pre>
  
  <p>When I change table name to "dbo.log", I can get resultSet without any error. </p>
  
  <pre><code> @Table(name = "dbo.log")
  </code></pre>
  
  <p>Is there any way to set default schema for postgresql queries?</p>
  
  <pre><code>@Configuration
  @EnableJpaRepositories(
      basePackages = "com.test.repository.postgresql",
      entityManagerFactoryRef = "postgresqlEntityManagerFactory",
      transactionManagerRef = "postgresqlTransactionManager"
  )
  public class PostgreSQLConfig {
  
      ....
  
      @Bean(name = "postgresqlEntityManagerFactory")
      public EntityManagerFactory entityManagerFactory(@Qualifier("postgresqlDatasource") DataSource postgresqlDatasource) {
  
          Properties jpaProperties = new Properties();
          jpaProperties.setProperty("hibernate.dialect", hibernateDialect);
          jpaProperties.setProperty("hibernate.show_sql", hibernateShowSql);
          jpaProperties.setProperty("hibernate.ddl-auto", hibernateDDLAuto);
          jpaProperties.setProperty("hibernate.naming.physical-strategy", hibernatePhysicalStrategy);
          jpaProperties.setProperty("hibernate.default_schema", "dbo");
  
          HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
          vendorAdapter.setDatabase(Database.POSTGRESQL);
          LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
          factory.setJpaVendorAdapter(vendorAdapter);
          factory.setJpaProperties(jpaProperties);
          factory.setPackagesToScan("com.test.entity.postgresql");
          factory.setDataSource(postgresqlDatasource);
          factory.afterPropertiesSet();
          return factory.getObject();
      }
  
  }
  </code></pre>
  
  <p>Here is my entity class;</p>
  
  <pre><code>@Entity
  @Table(name = "log", schema = "dbo")
  public class Log{
      ....
  }
  </code></pre>