StatementCreatorUtils handles Types.BOOLEAN through PreparedStatement.setBoolean

Issue: SPR-14116
This commit is contained in:
Juergen Hoeller
2016-04-05 11:12:36 +02:00
parent 7c450fad3b
commit 797f5dbba6
2 changed files with 27 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -364,6 +364,14 @@ public abstract class StatementCreatorUtils {
ps.setObject(paramIndex, inValue, sqlType);
}
}
else if (sqlType == Types.BOOLEAN) {
if (inValue instanceof Boolean) {
ps.setBoolean(paramIndex, (Boolean) inValue);
}
else {
ps.setObject(paramIndex, inValue, Types.BOOLEAN);
}
}
else if (sqlType == Types.DATE) {
if (inValue instanceof java.util.Date) {
if (inValue instanceof java.sql.Date) {