From 51adacd3d82d5c9bd4a01e5c0d308f5f9bef8fed Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Tue, 2 Nov 2010 19:40:08 +0800 Subject: [PATCH] HHH-5659 Problem using Hibernate3.6.0.Final with CLOB field in Oracle. --- core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | 1 + .../java/org/hibernate/type/AbstractStandardBasicType.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java b/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java index fbda191f579a..e391b178f90c 100644 --- a/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java +++ b/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java @@ -204,6 +204,7 @@ public SessionFactoryImpl( log.debug( "Statistics initialized [enabled={}]}", settings.isStatisticsEnabled() ); this.properties = new Properties(); + this.properties.putAll(settings.getDialect().getDefaultProperties()); this.properties.putAll( cfg.getProperties() ); this.interceptor = cfg.getInterceptor(); this.settings = settings; diff --git a/core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java b/core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java index f87a89173218..2e8d624aff41 100644 --- a/core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java +++ b/core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java @@ -45,6 +45,7 @@ import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; import org.hibernate.util.ArrayHelper; +import org.hibernate.util.PropertiesHelper; /** * TODO : javadoc @@ -266,7 +267,7 @@ public final void nullSafeSet( // todo : have SessionImplementor extend WrapperOptions final WrapperOptions options = new WrapperOptions() { public boolean useStreamForLobBinding() { - return Environment.useStreamsForBinary(); + return PropertiesHelper.getBoolean(Environment.USE_STREAMS_FOR_BINARY, session.getFactory().getProperties()); } public LobCreator getLobCreator() {