Expand DB2Dialect auto-discovery support (Martin Renner)

Description

I would like to have more entries for autodetecting DB2 dialects. According to I created a patch.

At the moment, DialectFactory knows just "DB2/NT". We are currently using DB2Dialect for "DB2/6000" and "DB2/LINUX", but we would like to have Hibernate autodetect these dialects.

So the patch simply adds two new lines to DialectFactory.

It would be really helpful for us, if this patch would make it into 3.1.x and 3.2.x. The patch works for 3.1.3 and 3.2.0cr4.

Environment

None

Activity

Show:
GinoM
September 20, 2007, 11:35 PM

According to this IBM tech-note (http://www-1.ibm.com/support/docview.wss?rs=457&context=SSBRLP&dc=DB520&uid=swg21233268&loc=en_US&cs=UTF-8&lang=en), several DB Product names are possible. The below snippet includes all of the ones from the tech-note. The first two are in the source tar-ball for 3.2.5.ga. The second and third are added in the attached patch.

----------------------------------------------- Snippet from DialectFactory.java
MAPPERS.put( "DB2/NT", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/LINUX", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/6000", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/HPUX", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/SUN", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/LINUX390", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/AIX64", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );

Steve Ebersole
October 3, 2007, 5:10 AM

applied to 3.2/trunk

thanks

Assignee

Steve Ebersole

Reporter

Martin Renner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure