HHH-6073 - Dialects cannot use the Thread Context ClassLoader with AS7, please change to use the
This commit is contained in:
parent
aad256c634
commit
7c4a9dac81
|
@ -80,12 +80,11 @@ public class StandardDialectResolver extends AbstractDialectResolver {
|
|||
}
|
||||
|
||||
if ( "Apache Derby".equals( databaseName ) ) {
|
||||
int driverVersionMajor = metaData.getDriverMajorVersion();
|
||||
int driverVersionMinor = metaData.getDriverMinorVersion();
|
||||
if ( driverVersionMajor > 10 || ( driverVersionMajor == 10 && driverVersionMinor >= 6 ) ) {
|
||||
final int databaseMinorVersion = metaData.getDatabaseMinorVersion();
|
||||
if ( databaseMajorVersion > 10 || ( databaseMajorVersion == 10 && databaseMinorVersion >= 6 ) ) {
|
||||
return new DerbyTenSixDialect();
|
||||
}
|
||||
else if ( driverVersionMajor == 10 && driverVersionMinor == 5 ) {
|
||||
else if ( databaseMajorVersion == 10 && databaseMinorVersion == 5 ) {
|
||||
return new DerbyTenFiveDialect();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
package org.hibernate.dialect;
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
@ -122,6 +123,10 @@ public class Mocks {
|
|||
return Integer.valueOf( majorVersion );
|
||||
}
|
||||
|
||||
if ( "getDatabaseMinorVersion".equals( methodName ) ) {
|
||||
return Integer.valueOf( minorVersion );
|
||||
}
|
||||
|
||||
if ( "getConnection".equals( methodName ) ) {
|
||||
return connectionProxy;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue