/** * Reset field type to use BLOB/CLOB with type conversion mapping fix for 4k oracle thin driver bug. */ private void resetFieldTypeForLOB(DirectToFieldMapping mapping) { if (mapping.getFieldClassification().getName().equals("java.sql.Blob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate BLOB type, SQL Server generats IMAGE. getFieldDefFromDBField(mapping.getField(), false).setType(Byte[].class); } else if (mapping.getFieldClassification().getName().equals("java.sql.Clob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate CLOB type. SQL Server generats TEXT. getFieldDefFromDBField(mapping.getField(), false).setType(Character[].class); } }
/** * Reset field type to use BLOB/CLOB with type conversion mapping fix for 4k oracle thin driver bug. */ protected void resetFieldTypeForLOB(DirectToFieldMapping mapping) { if (mapping.getFieldClassification().getName().equals("java.sql.Blob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate BLOB type, SQL Server generats IMAGE. getFieldDefFromDBField(mapping.getField()).setType(Byte[].class); } else if (mapping.getFieldClassification().getName().equals("java.sql.Clob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate CLOB type. SQL Server generats TEXT. getFieldDefFromDBField(mapping.getField()).setType(Character[].class); } }
/** * Reset field type to use BLOB/CLOB with type conversion mapping fix for 4k oracle thin driver bug. */ protected void resetFieldTypeForLOB(DirectToFieldMapping mapping) { if (mapping.getFieldClassification().getName().equals("java.sql.Blob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate BLOB type, SQL Server generats IMAGE. getFieldDefFromDBField(mapping.getField()).setType(Byte[].class); } else if (mapping.getFieldClassification().getName().equals("java.sql.Clob")) { //allow the platform to figure out what database field type gonna be used. //For example, Oracle9 will generate CLOB type. SQL Server generats TEXT. getFieldDefFromDBField(mapping.getField()).setType(Character[].class); } }
@Override public void logDatabaseMapping(final DirectToFieldMapping databaseMapping, final Session session) { logFine(session, "\tmapping.attributeName : {0}", databaseMapping.getAttributeName()); logFine(session, "\tmapping.attributeClassification: {0}", databaseMapping.getAttributeClassification()); logFine(session, "\tmapping.field.name : {0}", databaseMapping.getField().getName()); logFine(session, "\tmapping.field.sqlType : {0}", databaseMapping.getField().getSqlType()); logFine(session, "\tmapping.field.typeName: {0}", databaseMapping.getField().getTypeName()); logFine(session, "\tmapping.field.columnDefinition : {0}", databaseMapping.getField().getColumnDefinition()); logFine(session, "\tmapping.fieldClassfication : {0}", databaseMapping.getFieldClassification()); }