From f0f852f14f4b06092f8287e3003b295294e2c994 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 17 Jul 2015 09:33:14 -0500 Subject: [PATCH] HHH-9931 - Enable pgsql database profile --- databases/.gitignore | 1 + databases/pgsql/matrix.gradle | 7 +++++ .../pgsql/resources/hibernate.properties | 29 +++++++++++++++++++ .../NewGeneratorMappingsTest.java | 1 - 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 databases/pgsql/matrix.gradle create mode 100644 databases/pgsql/resources/hibernate.properties diff --git a/databases/.gitignore b/databases/.gitignore index f17ea91c47..7ca405c7b6 100644 --- a/databases/.gitignore +++ b/databases/.gitignore @@ -1,2 +1,3 @@ !mariadb/ +!pgsql/ ./ \ No newline at end of file diff --git a/databases/pgsql/matrix.gradle b/databases/pgsql/matrix.gradle new file mode 100644 index 0000000000..868061824d --- /dev/null +++ b/databases/pgsql/matrix.gradle @@ -0,0 +1,7 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +jdbcDependency 'org.postgresql:postgresql:9.4-1201-jdbc41' \ No newline at end of file diff --git a/databases/pgsql/resources/hibernate.properties b/databases/pgsql/resources/hibernate.properties new file mode 100644 index 0000000000..dd4e11db6b --- /dev/null +++ b/databases/pgsql/resources/hibernate.properties @@ -0,0 +1,29 @@ +# +# Hibernate, Relational Persistence for Idiomatic Java +# +# License: GNU Lesser General Public License (LGPL), version 2.1 or later. +# See the lgpl.txt file in the root directory or . +# + +hibernate.dialect org.hibernate.dialect.PostgreSQL94Dialect +hibernate.connection.driver_class org.postgresql.Driver +hibernate.connection.url jdbc:postgresql:hibernate_orm_test +hibernate.connection.username hibernate_orm_test +hibernate.connection.password hibernate_orm_test + +hibernate.connection.pool_size 5 + +hibernate.show_sql false +hibernate.format_sql true + +hibernate.max_fetch_depth 5 + +hibernate.cache.region_prefix hibernate.test +hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory + +# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle +hibernate.jdbc.batch_versioned_data true + +javax.persistence.validation.mode=NONE +hibernate.service.allow_crawling=false +hibernate.session.events.log=true \ No newline at end of file diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/id/generationmappings/NewGeneratorMappingsTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/id/generationmappings/NewGeneratorMappingsTest.java index 3ad9bd0a82..9a778187a5 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/id/generationmappings/NewGeneratorMappingsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/id/generationmappings/NewGeneratorMappingsTest.java @@ -80,7 +80,6 @@ public class NewGeneratorMappingsTest extends BaseCoreFunctionalTestCase { IdentifierGenerator generator = persister.getIdentifierGenerator(); assertTrue( SequenceStyleGenerator.class.isInstance( generator ) ); SequenceStyleGenerator seqGenerator = (SequenceStyleGenerator) generator; - assertEquals( "my_catalog.my_schema."+CompleteSequenceEntity.SEQ_NAME, seqGenerator.getDatabaseStructure().getName() ); assertEquals( 1000, seqGenerator.getDatabaseStructure().getInitialValue() ); assertEquals( 52, seqGenerator.getDatabaseStructure().getIncrementSize() ); assertFalse( NoopOptimizer.class.isInstance( seqGenerator.getOptimizer() ) );