private Properties jpaProperties() { Properties extraProperties = new Properties(); if (CommonConfig.isLocalTestMode()) { extraProperties.put("hibernate.dialect", DerbyTenSevenDialect.class.getName()); } else { extraProperties.put("hibernate.dialect", PostgreSQL94Dialect.class.getName()); } extraProperties.put("hibernate.format_sql", "false"); extraProperties.put("hibernate.show_sql", "false"); extraProperties.put("hibernate.hbm2ddl.auto", "update"); extraProperties.put("hibernate.jdbc.batch_size", "20"); extraProperties.put("hibernate.cache.use_query_cache", "false"); extraProperties.put("hibernate.cache.use_second_level_cache", "false"); extraProperties.put("hibernate.cache.use_structured_entries", "false"); extraProperties.put("hibernate.cache.use_minimal_puts", "false"); extraProperties.put("hibernate.search.model_mapping", LuceneSearchMappingFactory.class.getName()); extraProperties.put("hibernate.search.default.directory_provider", "filesystem"); extraProperties.put("hibernate.search.default.indexBase", myFhirLuceneLocation); extraProperties.put("hibernate.search.lucene_version", "LUCENE_CURRENT"); return extraProperties; }
/** * Tests whether the PostgreSQL identifier limit is respected in case of * tables. */ @Test public void testPostgreSqlTableIdentifierLimit() throws SQLException { int lengthLimit = PhysicalNamingStrategyShogun2.LENGTH_LIMIT_POSTGRESQL; Dialect dialect = new PostgreSQL94Dialect(); testTableIdentifierLimit(lengthLimit, dialect); }
/** * Tests whether the PostgreSQL identifier limit is respected in case of * columns. */ @Test public void testPostgreSqlColumnIdentifierLimit() throws SQLException { int lengthLimit = PhysicalNamingStrategyShogun2.LENGTH_LIMIT_POSTGRESQL; Dialect dialect = new PostgreSQL94Dialect(); testColumnIdentifierLimit(lengthLimit, dialect); }
@Override public String hibernateDialect() { return PostgreSQL94Dialect.class.getName(); }