Browse Source

Merge branch 'release/10.0' of https://cloud.finedevelop.com/scm/~hugh.c/base-third into release/10.0

release/10.0
Hugh.C 5 years ago
parent
commit
5a5eef56e0
  1. 11
      fine-hibernate/src/com/fr/third/org/hibernate/cfg/annotations/SimpleValueBinder.java

11
fine-hibernate/src/com/fr/third/org/hibernate/cfg/annotations/SimpleValueBinder.java

@ -54,6 +54,7 @@ import com.fr.third.org.hibernate.type.PrimitiveCharacterArrayNClobType;
import com.fr.third.org.hibernate.type.SerializableToBlobType;
import com.fr.third.org.hibernate.type.StandardBasicTypes;
import com.fr.third.org.hibernate.type.StringNVarcharType;
import com.fr.third.org.hibernate.type.StringType;
import com.fr.third.org.hibernate.type.WrappedMaterializedBlobType;
import com.fr.third.org.hibernate.usertype.DynamicParameterizedType;
@ -89,6 +90,14 @@ public class SimpleValueBinder {
private AttributeConverterDescriptor attributeConverterDescriptor;
private static String DRIVER_CLASS;
private static final String DB2_PREFIX = "db2";
public static void setDriverClass(String driverClass) {
DRIVER_CLASS = driverClass;
}
public void setReferencedEntityName(String referencedEntityName) {
this.referencedEntityName = referencedEntityName;
}
@ -278,7 +287,7 @@ public class SimpleValueBinder {
else if ( isNationalized ) {
if ( buildingContext.getBuildingOptions().getReflectionManager().equals( returnedClassOrElement, String.class ) ) {
// nvarchar
type = StringNVarcharType.INSTANCE.getName();
type = DRIVER_CLASS != null && DRIVER_CLASS.contains(DB2_PREFIX) ? StringType.INSTANCE.getName() : StringNVarcharType.INSTANCE.getName();
explicitType = type;
}
else if ( buildingContext.getBuildingOptions().getReflectionManager().equals( returnedClassOrElement, Character.class ) ||

Loading…
Cancel
Save