Browse Source

fixed index test for parameter types (SPR-7199)

pull/1234/head
Thomas Risberg 15 years ago
parent
commit
d22a6f9da9
  1. 2
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java

2
org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java

@ -604,7 +604,7 @@ public abstract class AbstractJdbcInsert { @@ -604,7 +604,7 @@ public abstract class AbstractJdbcInsert {
int colIndex = 0;
for (Object value : values) {
colIndex++;
if (columnTypes == null || colIndex < columnTypes.length) {
if (columnTypes == null || colIndex > columnTypes.length) {
StatementCreatorUtils.setParameterValue(preparedStatement, colIndex, SqlTypeValue.TYPE_UNKNOWN, value);
}
else {

Loading…
Cancel
Save