HHH-15447 - Remove references to deprecated dialects

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
Jan Schatteman 2022-07-28 17:32:53 +02:00 committed by Christian Beikov
parent 89f901109e
commit 3dec1ca4dc
43 changed files with 174 additions and 139 deletions

View File

@ -21,7 +21,7 @@ strategy Class name::
[[configurations-general]] [[configurations-general]]
=== General configuration === General configuration
`*hibernate.dialect*` (e.g. `org.hibernate.dialect.PostgreSQL94Dialect`):: `*hibernate.dialect*` (e.g. `org.hibernate.dialect.PostgreSQLDialect`)::
The class name of a Hibernate https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/dialect/Dialect.html[`Dialect`] from which Hibernate can generate SQL optimized for a particular relational database. The class name of a Hibernate https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/dialect/Dialect.html[`Dialect`] from which Hibernate can generate SQL optimized for a particular relational database.
+ +
In most cases, Hibernate can choose the correct https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/dialect/Dialect.html[`Dialect`] implementation based on the JDBC metadata returned by the JDBC driver. In most cases, Hibernate can choose the correct https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/dialect/Dialect.html[`Dialect`] implementation based on the JDBC metadata returned by the JDBC driver.

View File

@ -12,7 +12,7 @@ import jakarta.persistence.Id;
import org.hibernate.annotations.Generated; import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime; import org.hibernate.annotations.GenerationTime;
import org.hibernate.dialect.SQLServer2005Dialect; import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa; import org.hibernate.testing.orm.junit.Jpa;
@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
/** /**
* @author Vlad Mihalcea * @author Vlad Mihalcea
*/ */
@RequiresDialect(value = SQLServer2005Dialect.class, majorVersion = 9) @RequiresDialect(value = SQLServerDialect.class)
@Jpa( @Jpa(
annotatedClasses = GeneratedTest.Person.class annotatedClasses = GeneratedTest.Person.class
) )

View File

@ -61,9 +61,7 @@ hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
## Oracle ## Oracle
#hibernate.dialect org.hibernate.dialect.Oracle8iDialect #hibernate.dialect org.hibernate.dialect.OracleDialect
#hibernate.dialect org.hibernate.dialect.Oracle9iDialect
#hibernate.dialect org.hibernate.dialect.Oracle10gDialect
#hibernate.connection.driver_class oracle.jdbc.OracleDriver #hibernate.connection.driver_class oracle.jdbc.OracleDriver
#hibernate.connection.username ora #hibernate.connection.username ora
#hibernate.connection.password ora #hibernate.connection.password ora
@ -100,7 +98,7 @@ hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
## DB2/400 ## DB2/400
#hibernate.dialect org.hibernate.dialect.DB2400Dialect #hibernate.dialect org.hibernate.dialect.DB2iDialect
#hibernate.connection.username user #hibernate.connection.username user
#hibernate.connection.password password #hibernate.connection.password password

View File

@ -82,7 +82,7 @@ hibernate.connection.url @DB_URL@
## DB2/400 ## DB2/400
#hibernate.dialect org.hibernate.dialect.DB2400Dialect #hibernate.dialect org.hibernate.dialect.DB2iDialect
#hibernate.connection.username user #hibernate.connection.username user
#hibernate.connection.password password #hibernate.connection.password password

View File

@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
* *
* @author Vlad Mihalcea * @author Vlad Mihalcea
*/ */
@RequiresDialect(value = SQLServerDialect.class, majorVersion = 9) @RequiresDialect(value = SQLServerDialect.class)
@DomainModel( @DomainModel(
annotatedClasses = { IrrelevantEntity.class } annotatedClasses = { IrrelevantEntity.class }
) )

View File

@ -11,7 +11,6 @@ import org.hibernate.LockOptions;
import org.hibernate.community.dialect.SQLServerLegacyDialect; import org.hibernate.community.dialect.SQLServerLegacyDialect;
import org.hibernate.dialect.DatabaseVersion; import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.SQLServer2005Dialect;
import org.hibernate.orm.test.dialect.unit.lockhint.AbstractLockHintTest; import org.hibernate.orm.test.dialect.unit.lockhint.AbstractLockHintTest;
/** /**

View File

@ -4,10 +4,11 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.orm.test.dialect.unit.sequence; package org.hibernate.community.dialect.unit.sequence;
import org.hibernate.dialect.DB2390Dialect; import org.hibernate.community.dialect.DB2zLegacyDialect;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.orm.test.dialect.unit.sequence.AbstractSequenceInformationExtractorTest;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl; import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor; import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
@ -21,7 +22,7 @@ public class DB2390SequenceInformationExtractorTest extends AbstractSequenceInfo
@Override @Override
public Dialect getDialect() { public Dialect getDialect() {
return new DB2390Dialect(); return new DB2zLegacyDialect();
} }
@Override @Override

View File

@ -4,10 +4,11 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.orm.test.dialect.unit.sequence; package org.hibernate.community.dialect.unit.sequence;
import org.hibernate.dialect.DB2400Dialect; import org.hibernate.community.dialect.DB2iLegacyDialect;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.orm.test.dialect.unit.sequence.AbstractSequenceInformationExtractorTest;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl; import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor; import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
@ -22,7 +23,7 @@ public class DB2400SequenceInformationExtractorTest extends AbstractSequenceInfo
@Override @Override
public Dialect getDialect() { public Dialect getDialect() {
return new DB2400Dialect(); return new DB2iLegacyDialect();
} }
@Override @Override

View File

@ -6,7 +6,7 @@
*/ */
package org.hibernate.dialect; package org.hibernate.dialect;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport; import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport; import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler; import org.hibernate.dialect.pagination.FetchLimitHandler;
import org.hibernate.dialect.pagination.LimitHandler; import org.hibernate.dialect.pagination.LimitHandler;
@ -64,6 +64,6 @@ public class DB2390Dialect extends DB2Dialect {
@Override @Override
public IdentityColumnSupport getIdentityColumnSupport() { public IdentityColumnSupport getIdentityColumnSupport() {
return new DB2390IdentityColumnSupport(); return new DB2zIdentityColumnSupport();
} }
} }

View File

@ -6,7 +6,7 @@
*/ */
package org.hibernate.dialect; package org.hibernate.dialect;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport; import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport; import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler; import org.hibernate.dialect.pagination.FetchLimitHandler;
import org.hibernate.dialect.pagination.LimitHandler; import org.hibernate.dialect.pagination.LimitHandler;
@ -48,6 +48,6 @@ public class DB2400Dialect extends DB2Dialect {
@Override @Override
public IdentityColumnSupport getIdentityColumnSupport() { public IdentityColumnSupport getIdentityColumnSupport() {
return new DB2390IdentityColumnSupport(); return new DB2zIdentityColumnSupport();
} }
} }

View File

@ -7,7 +7,7 @@
package org.hibernate.dialect; package org.hibernate.dialect;
import org.hibernate.dialect.function.CommonFunctionFactory; import org.hibernate.dialect.function.CommonFunctionFactory;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport; import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.DB2IdentityColumnSupport; import org.hibernate.dialect.identity.DB2IdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport; import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler; import org.hibernate.dialect.pagination.FetchLimitHandler;
@ -115,7 +115,7 @@ public class DB2iDialect extends DB2Dialect {
public IdentityColumnSupport getIdentityColumnSupport() { public IdentityColumnSupport getIdentityColumnSupport() {
return getVersion().isSameOrAfter(7, 3) return getVersion().isSameOrAfter(7, 3)
? new DB2IdentityColumnSupport() ? new DB2IdentityColumnSupport()
: new DB2390IdentityColumnSupport(); : new DB2zIdentityColumnSupport();
} }
@Override @Override

View File

@ -10,7 +10,7 @@ package org.hibernate.dialect;
import jakarta.persistence.TemporalType; import jakarta.persistence.TemporalType;
import org.hibernate.dialect.function.CommonFunctionFactory; import org.hibernate.dialect.function.CommonFunctionFactory;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport; import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport; import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.LimitHandler; import org.hibernate.dialect.pagination.LimitHandler;
import org.hibernate.dialect.pagination.OffsetFetchLimitHandler; import org.hibernate.dialect.pagination.OffsetFetchLimitHandler;
@ -110,7 +110,7 @@ public class DB2zDialect extends DB2Dialect {
@Override @Override
public IdentityColumnSupport getIdentityColumnSupport() { public IdentityColumnSupport getIdentityColumnSupport() {
return new DB2390IdentityColumnSupport(); return new DB2zIdentityColumnSupport();
} }
@Override @Override

View File

@ -1,17 +1,15 @@
/* /*
* Hibernate, Relational Persistence for Idiomatic Java * Hibernate, Relational Persistence for Idiomatic Java
* *
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/ */
package org.hibernate.dialect.identity; package org.hibernate.dialect.identity;
/** /**
* @author Andrea Boriero * @author Jan Schatteman
* @deprecated use {@code DB2zIdentityColumnSupport}
*/ */
public class DB2390IdentityColumnSupport extends DB2IdentityColumnSupport { @Deprecated
@Override public class DB2390IdentityColumnSupport extends DB2zIdentityColumnSupport {
public String getIdentitySelectString(String table, String column, int type) {
return "select identity_val_local() from sysibm.sysdummy1";
}
} }

View File

@ -0,0 +1,17 @@
/*
* 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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.dialect.identity;
/**
* @author Andrea Boriero
*/
public class DB2zIdentityColumnSupport extends DB2IdentityColumnSupport {
@Override
public String getIdentitySelectString(String table, String column, int type) {
return "select identity_val_local() from sysibm.sysdummy1";
}
}

View File

@ -7,7 +7,7 @@
package org.hibernate.dialect.sequence; package org.hibernate.dialect.sequence;
/** /**
* Sequence support for {@link org.hibernate.dialect.DB2390Dialect}. * Sequence support for {@link org.hibernate.dialect.DB2zDialect}.
* *
* @author Gavin King * @author Gavin King
*/ */

View File

@ -21,7 +21,7 @@ import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.dialect.PostgreSQL81Dialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property; import org.hibernate.mapping.Property;
@ -49,7 +49,9 @@ public class EnumeratedWithMappedSuperclassTest extends BaseUnitTestCase {
@Before @Before
public void before() { public void before() {
ssr = new StandardServiceRegistryBuilder() ssr = new StandardServiceRegistryBuilder()
.applySetting( AvailableSettings.DIALECT, PostgreSQL81Dialect.class ) .applySetting( AvailableSettings.DIALECT, PostgreSQLDialect.class.getName() )
.applySetting( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "8" )
.applySetting( AvailableSettings.JAKARTA_HBM2DDL_DB_MINOR_VERSION, "1" )
.build(); .build();
} }

View File

@ -1,22 +0,0 @@
/*
* 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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.orm.test.annotations.lob;
import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupportImpl;
import org.hibernate.dialect.Oracle10gDialect;
/**
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*/
public class OracleSeqIdGenDialect extends Oracle10gDialect {
@Override
public IdentityColumnSupport getIdentityColumnSupport() {
return new IdentityColumnSupportImpl();
}
}

View File

@ -27,10 +27,6 @@ import org.hibernate.SessionFactory;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.H2Dialect; import org.hibernate.dialect.H2Dialect;
import org.hibernate.dialect.Oracle10gDialect;
import org.hibernate.dialect.Oracle12cDialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.Oracle9iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.junit.After; import org.junit.After;
@ -77,7 +73,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test @Test
public void testBatchVersionedDataForOracle10gDialect() { public void testBatchVersionedDataForOracle10gDialect() {
cfg.setProperty( AvailableSettings.DIALECT, Oracle10gDialect.class.getName() ); cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "10" );
sessionFactory = cfg.buildSessionFactory(); sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) ); assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -85,7 +82,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test @Test
public void testBatchVersionedDataForOracle8iDialect() { public void testBatchVersionedDataForOracle8iDialect() {
cfg.setProperty( AvailableSettings.DIALECT, Oracle8iDialect.class.getName() ); cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "8" );
sessionFactory = cfg.buildSessionFactory(); sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) ); assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -93,7 +91,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test @Test
public void testBatchVersionedDataForOracle9iDialect() { public void testBatchVersionedDataForOracle9iDialect() {
cfg.setProperty( AvailableSettings.DIALECT, Oracle9iDialect.class.getName() ); cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "9" );
sessionFactory = cfg.buildSessionFactory(); sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) ); assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -101,7 +100,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test @Test
public void testBatchVersionedDataForOracle12cDialect() { public void testBatchVersionedDataForOracle12cDialect() {
cfg.setProperty( AvailableSettings.DIALECT, Oracle12cDialect.class.getName() ); cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "12" );
sessionFactory = cfg.buildSessionFactory(); sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( true ) ); assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( true ) );

View File

@ -19,7 +19,6 @@ import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.dialect.SybaseASE15Dialect;
import org.hibernate.dialect.SybaseASEDialect; import org.hibernate.dialect.SybaseASEDialect;
import org.hibernate.mapping.Component; import org.hibernate.mapping.Component;
import org.hibernate.mapping.Formula; import org.hibernate.mapping.Formula;
@ -163,13 +162,7 @@ public class ComponentTest extends BaseSessionFactoryFunctionalTest {
s.createQuery( "from Employee e where e.person = :p and 1 = 1 and 2=2" ).setParameter( "p", emp.getPerson() ).list(); s.createQuery( "from Employee e where e.person = :p and 1 = 1 and 2=2" ).setParameter( "p", emp.getPerson() ).list();
s.createQuery( "from Employee e where :p = e.person" ).setParameter( "p", emp.getPerson() ).list(); s.createQuery( "from Employee e where :p = e.person" ).setParameter( "p", emp.getPerson() ).list();
// The following fails on Sybase due to HHH-3510. When HHH-3510 s.createQuery( "from Employee e where e.person = ('', '', current_timestamp, 0.0, 'steve', '', 0)" ).list();
// is fixed, the check for SybaseASE15Dialect should be removed.
if ( ! ( getDialect() instanceof SybaseASE15Dialect ) ) {
s.createQuery(
"from Employee e where e.person = ('', '', current_timestamp, 0.0, 'steve', '', 0)" )
.list();
}
s.delete( emp ); s.delete( emp );
} }

View File

@ -24,10 +24,7 @@
package org.hibernate.orm.test.dialect; package org.hibernate.orm.test.dialect;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Oracle10gDialect; import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.Oracle12cDialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.Oracle9iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.junit.Test; import org.junit.Test;
@ -39,25 +36,24 @@ import static org.junit.Assert.assertEquals;
/** /**
* @author Andrea Boriero * @author Andrea Boriero
*/ */
public class OracleDialectsTest { public class OracleDialectsTest {
@Test @Test
@TestForIssue( jiraKey = "HHH-9990") @TestForIssue( jiraKey = "HHH-9990")
public void testDefaultBatchVersionDataProperty(){ public void testDefaultBatchVersionDataProperty(){
Oracle8iDialect oracle8iDialect = new Oracle8iDialect();
assertEquals( "false", oracle8iDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
OracleDialect oracleDialect = new OracleDialect(); OracleDialect oracleDialect = new OracleDialect();
assertEquals( "false", oracleDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) ); assertEquals( "false", oracleDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
Oracle10gDialect oracle10gDialect = new Oracle10gDialect(); OracleDialect oracle8iDialect = new OracleDialect( DatabaseVersion.make( 8 ) );
assertEquals( "false", oracle8iDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
OracleDialect oracle10gDialect = new OracleDialect( DatabaseVersion.make( 10 ) );
assertEquals( "false", oracle10gDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) ); assertEquals( "false", oracle10gDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
Oracle9iDialect oracle9iDialect = new Oracle9iDialect(); OracleDialect oracle9iDialect = new OracleDialect( DatabaseVersion.make( 9 ) );
assertEquals( "false", oracle9iDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) ); assertEquals( "false", oracle9iDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
Oracle12cDialect oracle12cDialect = new Oracle12cDialect(); OracleDialect oracle12cDialect = new OracleDialect( DatabaseVersion.make( 12 ) );
assertEquals( "true", oracle12cDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) ); assertEquals( "true", oracle12cDialect.getDefaultProperties().getProperty( Environment.BATCH_VERSIONED_DATA ) );
} }
} }

View File

@ -6,7 +6,8 @@
*/ */
package org.hibernate.orm.test.dialect; package org.hibernate.orm.test.dialect;
import org.hibernate.dialect.PostgreSQL92Dialect; import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.junit4.BaseUnitTestCase;
@ -28,7 +29,7 @@ public class PostgreSQL92DialectTestCase extends BaseUnitTestCase {
@Test @Test
@TestForIssue( jiraKey = "HHH-11647" ) @TestForIssue( jiraKey = "HHH-11647" )
public void testGetAlterTableString() { public void testGetAlterTableString() {
PostgreSQL92Dialect dialect = new PostgreSQL92Dialect(); PostgreSQLDialect dialect = new PostgreSQLDialect( DatabaseVersion.make( 9, 2 ) );
assertEquals("alter table if exists table_name", dialect.getAlterTableString( "table_name" )); assertEquals("alter table if exists table_name", dialect.getAlterTableString( "table_name" ));
} }

View File

@ -8,7 +8,8 @@ package org.hibernate.orm.test.dialect;
import java.util.Locale; import java.util.Locale;
import org.hibernate.dialect.SQLServer2012Dialect; import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.query.spi.Limit; import org.hibernate.query.spi.Limit;
import org.junit.After; import org.junit.After;
@ -21,16 +22,16 @@ import org.hibernate.testing.junit4.BaseUnitTestCase;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
/** /**
* Tests the Limit/Offset handler for {@link SQLServer2012Dialect}. * Tests the Limit/Offset handler for {@link SQLServerDialect, v11}.
* *
* @author Chris Cranford * @author Chris Cranford
*/ */
public class SQLServer2012DialectTestCase extends BaseUnitTestCase { public class SQLServer2012DialectTestCase extends BaseUnitTestCase {
private SQLServer2012Dialect dialect; private SQLServerDialect dialect;
@Before @Before
public void setup() { public void setup() {
dialect = new SQLServer2012Dialect(); dialect = new SQLServerDialect( DatabaseVersion.make( 11 ) );
} }
@After @After

View File

@ -7,7 +7,6 @@
package org.hibernate.orm.test.dialect.functional; package org.hibernate.orm.test.dialect.functional;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.util.List; import java.util.List;
@ -21,11 +20,7 @@ import org.hibernate.boot.registry.BootstrapServiceRegistry;
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl; import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.SQLServer2005Dialect;
import org.hibernate.dialect.SQLServerDialect; import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess;
import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
@ -33,11 +28,9 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.testing.transaction.TransactionUtil; import org.hibernate.testing.transaction.TransactionUtil;
import org.junit.Test; import org.junit.Test;
import org.jboss.logging.Logger;
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/** /**
* used driver hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver * used driver hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver

View File

@ -30,7 +30,6 @@ import org.junit.Test;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Properties;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@ -66,8 +65,8 @@ public class DialectFactoryTest extends BaseUnitTestCase {
configValues.put( Environment.DIALECT, "H2" ); configValues.put( Environment.DIALECT, "H2" );
assertEquals( H2Dialect.class, dialectFactory.buildDialect( configValues, null ).getClass() ); assertEquals( H2Dialect.class, dialectFactory.buildDialect( configValues, null ).getClass() );
configValues.put( Environment.DIALECT, "Oracle10g" ); configValues.put( Environment.DIALECT, "Oracle" );
assertEquals( Oracle10gDialect.class, dialectFactory.buildDialect( configValues, null ).getClass() ); assertEquals( OracleDialect.class, dialectFactory.buildDialect( configValues, null ).getClass() );
} }
@Test @Test

View File

@ -8,8 +8,9 @@ package org.hibernate.orm.test.dialect.unit.locktimeout;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.LockOptions; import org.hibernate.LockOptions;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.Oracle12cDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.junit4.BaseUnitTestCase;
import org.junit.Test; import org.junit.Test;
@ -21,7 +22,7 @@ import static org.junit.Assert.assertEquals;
*/ */
public class OracleLockTimeoutTest extends BaseUnitTestCase { public class OracleLockTimeoutTest extends BaseUnitTestCase {
private final Dialect dialect = new Oracle12cDialect(); private final Dialect dialect = new OracleDialect( DatabaseVersion.make( 12 ) );
@Test @Test
public void testLockTimeoutNoAliasNoTimeout() { public void testLockTimeoutNoAliasNoTimeout() {

View File

@ -8,8 +8,9 @@ package org.hibernate.orm.test.dialect.unit.locktimeout;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.LockOptions; import org.hibernate.LockOptions;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQL95Dialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.junit4.BaseUnitTestCase;
import org.junit.Test; import org.junit.Test;
@ -21,7 +22,7 @@ import static org.junit.Assert.assertEquals;
*/ */
public class PostgreSQLLockTimeoutTest extends BaseUnitTestCase { public class PostgreSQLLockTimeoutTest extends BaseUnitTestCase {
private final Dialect dialect = new PostgreSQL95Dialect(); private final Dialect dialect = new PostgreSQLDialect( DatabaseVersion.make( 9, 5 ) );
@Test @Test
public void testLockTimeoutNoAliasNoTimeout() { public void testLockTimeoutNoAliasNoTimeout() {

View File

@ -0,0 +1,37 @@
/*
* 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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.orm.test.dialect.unit.sequence;
import org.hibernate.dialect.DB2iDialect;
import org.hibernate.dialect.Dialect;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.testing.TestForIssue;
/**
* @author Andrea Boriero
*/
@TestForIssue(jiraKey = "HHH-11470")
public class DB2iSequenceInformationExtractorTest extends AbstractSequenceInformationExtractorTest {
@Override
public Dialect getDialect() {
return new DB2iDialect();
}
@Override
public String expectedQuerySequencesString() {
return null;
}
@Override
public Class<? extends SequenceInformationExtractor> expectedSequenceInformationExtractor() {
return SequenceInformationExtractorNoOpImpl.class;
}
}

View File

@ -0,0 +1,36 @@
/*
* 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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.orm.test.dialect.unit.sequence;
import org.hibernate.dialect.DB2zDialect;
import org.hibernate.dialect.Dialect;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorDB2DatabaseImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.testing.TestForIssue;
/**
* @author Andrea Boriero
*/
@TestForIssue(jiraKey = "HHH-11470")
public class DB2zSequenceInformationExtractorTest extends AbstractSequenceInformationExtractorTest {
@Override
public Dialect getDialect() {
return new DB2zDialect();
}
@Override
public String expectedQuerySequencesString() {
return "select * from sysibm.syssequences";
}
@Override
public Class<? extends SequenceInformationExtractor> expectedSequenceInformationExtractor() {
return SequenceInformationExtractorDB2DatabaseImpl.class;
}
}

View File

@ -24,7 +24,6 @@ import jakarta.persistence.Table;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.hibernate.dialect.Oracle10gDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess; import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess;
import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.jdbc.spi.JdbcServices;

View File

@ -24,7 +24,6 @@ import jakarta.persistence.Table;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.hibernate.dialect.Oracle10gDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess; import org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess;
import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.jdbc.spi.JdbcServices;

View File

@ -9,7 +9,7 @@ package org.hibernate.orm.test.mapping;
import java.util.Locale; import java.util.Locale;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQL94Dialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.mapping.Column; import org.hibernate.mapping.Column;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
*/ */
public class ColumnLastIndexNotLetterAliasTest { public class ColumnLastIndexNotLetterAliasTest {
// Arbitrarily choose PostgreSQL // Arbitrarily choose PostgreSQL
private static final Dialect DIALECT = new PostgreSQL94Dialect();; private static final Dialect DIALECT = new PostgreSQLDialect();
@Test @Test
@TestForIssue(jiraKey = "HHH-14720") @TestForIssue(jiraKey = "HHH-14720")

View File

@ -6,7 +6,6 @@
*/ */
package org.hibernate.orm.test.mapping.generated; package org.hibernate.orm.test.mapping.generated;
import org.hibernate.dialect.Oracle9iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.RequiresDialect;

View File

@ -19,8 +19,6 @@ import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject; import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.model.relational.SqlStringGenerationContext; import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQL81Dialect;
import org.hibernate.dialect.PostgreSQL82Dialect;
import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.procedure.ProcedureCall; import org.hibernate.procedure.ProcedureCall;
import org.hibernate.procedure.ProcedureOutputs; import org.hibernate.procedure.ProcedureOutputs;
@ -53,8 +51,7 @@ public class PostgresRefCursorSupportTest extends BaseSessionFactoryFunctionalTe
@Override @Override
public boolean appliesToDialect(Dialect dialect) { public boolean appliesToDialect(Dialect dialect) {
return PostgreSQL81Dialect.class.isInstance( dialect ) return PostgreSQLDialect.class.isInstance( dialect );
|| PostgreSQL82Dialect.class.isInstance( dialect );
} }
@Override @Override

View File

@ -14,9 +14,7 @@ import jakarta.persistence.Id;
import org.hibernate.dialect.AbstractHANADialect; import org.hibernate.dialect.AbstractHANADialect;
import org.hibernate.dialect.MariaDBDialect; import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.dialect.MySQL8Dialect;
import org.hibernate.dialect.MySQLDialect; import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.Oracle9iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.testing.SkipForDialect; import org.hibernate.testing.SkipForDialect;

View File

@ -11,7 +11,7 @@ import java.util.Map;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.hibernate.dialect.PostgreSQL82Dialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase; import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase;
import org.hibernate.orm.test.envers.Priority; import org.hibernate.orm.test.envers.Priority;
import org.hibernate.testing.DialectChecks; import org.hibernate.testing.DialectChecks;
@ -38,7 +38,7 @@ public class Lobs extends BaseEnversJPAFunctionalTestCase {
@Override @Override
protected void addConfigOptions(Map options) { protected void addConfigOptions(Map options) {
super.addConfigOptions( options ); super.addConfigOptions( options );
if ( getDialect() instanceof PostgreSQL82Dialect ) { if ( getDialect() instanceof PostgreSQLDialect ) {
// In PostgreSQL LOBs cannot be used in auto-commit mode. // In PostgreSQL LOBs cannot be used in auto-commit mode.
options.put( "hibernate.connection.autocommit", "false" ); options.put( "hibernate.connection.autocommit", "false" );
} }

View File

@ -6,12 +6,9 @@
*/ */
package org.hibernate.envers.test.integration.readwriteexpression; package org.hibernate.envers.test.integration.readwriteexpression;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.OracleDialect;
import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase; import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase;
import org.hibernate.orm.test.envers.Priority; import org.hibernate.orm.test.envers.Priority;

View File

@ -16,7 +16,6 @@ import jakarta.transaction.Status;
import jakarta.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.dialect.CockroachDialect; import org.hibernate.dialect.CockroachDialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.envers.RevisionType; import org.hibernate.envers.RevisionType;
import org.hibernate.envers.enhanced.SequenceIdRevisionEntity; import org.hibernate.envers.enhanced.SequenceIdRevisionEntity;
@ -26,7 +25,6 @@ import org.hibernate.orm.test.envers.entities.collection.MultipleCollectionEntit
import org.hibernate.orm.test.envers.entities.collection.MultipleCollectionRefEntity1; import org.hibernate.orm.test.envers.entities.collection.MultipleCollectionRefEntity1;
import org.hibernate.orm.test.envers.entities.collection.MultipleCollectionRefEntity2; import org.hibernate.orm.test.envers.entities.collection.MultipleCollectionRefEntity2;
import org.hibernate.testing.SkipForDialect; import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.SkipForDialects;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.jta.TestingJtaBootstrap; import org.hibernate.testing.jta.TestingJtaBootstrap;
import org.hibernate.testing.jta.TestingJtaPlatformImpl; import org.hibernate.testing.jta.TestingJtaPlatformImpl;
@ -228,12 +226,8 @@ public class DetachedMultipleCollectionChangeTest extends BaseEnversJPAFunctiona
} }
@Test @Test
@SkipForDialects( value = { @SkipForDialect(value = CockroachDialect.class,
@SkipForDialect(value = CockroachDialect.class, comment = "requires serial_normalization=sql_sequence setting")
comment = "requires serial_normalization=sql_sequence setting"),
@SkipForDialect(value = Oracle8iDialect.class,
comment = "Oracle does not support identity key generation")
})
public void testAuditJoinTable() throws Exception { public void testAuditJoinTable() throws Exception {
List<AuditJoinTableInfo> mceRe1AuditJoinTableInfos = getAuditJoinTableRows( List<AuditJoinTableInfo> mceRe1AuditJoinTableInfos = getAuditJoinTableRows(
"MCE_RE1_AUD", "MCE_ID", "MCE_RE1_AUD", "MCE_ID",

View File

@ -10,7 +10,7 @@ import java.util.Arrays;
import java.util.Map; import java.util.Map;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.hibernate.dialect.PostgreSQL82Dialect; import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.envers.test.integration.data.LobSerializableTestEntity; import org.hibernate.envers.test.integration.data.LobSerializableTestEntity;
import org.hibernate.envers.test.integration.data.SerObject; import org.hibernate.envers.test.integration.data.SerObject;
import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase; import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase;
@ -34,7 +34,7 @@ public class LobSerializables extends BaseEnversJPAFunctionalTestCase {
@Override @Override
protected void addConfigOptions(Map options) { protected void addConfigOptions(Map options) {
super.addConfigOptions( options ); super.addConfigOptions( options );
if ( getDialect() instanceof PostgreSQL82Dialect ) { if ( getDialect() instanceof PostgreSQLDialect ) {
// In PostgreSQL LOBs cannot be used in auto-commit mode. // In PostgreSQL LOBs cannot be used in auto-commit mode.
options.put( "hibernate.connection.autocommit", "false" ); options.put( "hibernate.connection.autocommit", "false" );
} }

View File

@ -13,7 +13,7 @@ import java.util.Map;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase; import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase;
import org.hibernate.orm.test.envers.entities.StrTestEntity; import org.hibernate.orm.test.envers.entities.StrTestEntity;
@ -66,7 +66,7 @@ public class OrderSequenceGenerationTest extends BaseEnversJPAFunctionalTestCase
final String[] createStrings = getDialect().getSequenceSupport().getCreateSequenceStrings( "REVISION_GENERATOR", 1, 1 ); final String[] createStrings = getDialect().getSequenceSupport().getCreateSequenceStrings( "REVISION_GENERATOR", 1, 1 );
final String content = new String( Files.readAllBytes( createSchema.toPath() ) ).toLowerCase(); final String content = new String( Files.readAllBytes( createSchema.toPath() ) ).toLowerCase();
for ( int i = 0; i < createStrings.length; ++i ) { for ( int i = 0; i < createStrings.length; ++i ) {
if ( getDialect() instanceof Oracle8iDialect ) { if ( getDialect() instanceof OracleDialect ) {
assertTrue( content.contains( ( createStrings[ i ] + " ORDER" ).toLowerCase() ) ); assertTrue( content.contains( ( createStrings[ i ] + " ORDER" ).toLowerCase() ) );
} }
else { else {

View File

@ -22,7 +22,7 @@
<property name="connection.username">sa</property> <property name="connection.username">sa</property>
<property name="connection.password"></property> <property name="connection.password"></property>
<!--<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>--> <!--<property name="dialect">org.hibernate.dialect.MySQLDialect</property>-->
<!--<property name="connection.url">jdbc:mysql:///hibernate_tests?useUnicode=true&amp;characterEncoding=UTF-8</property>--> <!--<property name="connection.url">jdbc:mysql:///hibernate_tests?useUnicode=true&amp;characterEncoding=UTF-8</property>-->
<!--<property name="connection.driver_class">com.mysql.jdbc.Driver</property>--> <!--<property name="connection.driver_class">com.mysql.jdbc.Driver</property>-->
<!--<property name="connection.username">root</property>--> <!--<property name="connection.username">root</property>-->

View File

@ -12,7 +12,7 @@ import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.MySQL5Dialect; import org.hibernate.dialect.MySQLDialect;
/** /**
* @author Vlad Mihalcea * @author Vlad Mihalcea
@ -23,7 +23,7 @@ public class MySQLIdleConnectionCounter implements IdleConnectionCounter {
@Override @Override
public boolean appliesTo(Class<? extends Dialect> dialect) { public boolean appliesTo(Class<? extends Dialect> dialect) {
return MySQL5Dialect.class.isAssignableFrom( dialect ); return MySQLDialect.class.isAssignableFrom( dialect );
} }
@Override @Override

View File

@ -12,7 +12,7 @@ import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.Oracle10gDialect; import org.hibernate.dialect.OracleDialect;
/** /**
* @author Vlad Mihalcea * @author Vlad Mihalcea
@ -23,7 +23,7 @@ public class OracleIdleConnectionCounter implements IdleConnectionCounter {
@Override @Override
public boolean appliesTo(Class<? extends Dialect> dialect) { public boolean appliesTo(Class<? extends Dialect> dialect) {
return Oracle10gDialect.class.isAssignableFrom( dialect ); return OracleDialect.class.isAssignableFrom( dialect );
} }
@Override @Override

View File

@ -12,7 +12,7 @@ import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQL91Dialect; import org.hibernate.dialect.PostgreSQLDialect;
/** /**
* @author Vlad Mihalcea * @author Vlad Mihalcea
@ -23,7 +23,7 @@ public class PostgreSQLIdleConnectionCounter implements IdleConnectionCounter {
@Override @Override
public boolean appliesTo(Class<? extends Dialect> dialect) { public boolean appliesTo(Class<? extends Dialect> dialect) {
return PostgreSQL91Dialect.class.isAssignableFrom( dialect ); return PostgreSQLDialect.class.isAssignableFrom( dialect );
} }
@Override @Override