StatementCreatorUtils.setValue only uses setString etc for Types.OTHER in case of Oracle

Issue: SPR-12890
This commit is contained in:
Juergen Hoeller
2015-04-16 21:53:51 +02:00
parent 10a51a4f19
commit 050e581c10
2 changed files with 11 additions and 2 deletions

View File

@@ -410,7 +410,8 @@ public abstract class StatementCreatorUtils {
ps.setObject(paramIndex, inValue, Types.TIMESTAMP);
}
}
else if (sqlType == SqlTypeValue.TYPE_UNKNOWN || sqlType == Types.OTHER) {
else if (sqlType == SqlTypeValue.TYPE_UNKNOWN || (sqlType == Types.OTHER &&
"Oracle".equals(ps.getConnection().getMetaData().getDatabaseProductName()))) {
if (isStringValue(inValue.getClass())) {
ps.setString(paramIndex, inValue.toString());
}