Browse Source

Process NULLABLE column as integer instead of boolean

Issue: SPR-15333
pull/1357/merge
Juergen Hoeller 9 years ago
parent
commit
79ea77908a
  1. 11
      spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java

11
spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2016 the original author or authors. * Copyright 2002-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -361,15 +361,14 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider {
columnType == DatabaseMetaData.procedureColumnOut)) { columnType == DatabaseMetaData.procedureColumnOut)) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Skipping metadata for: " + columnType + " " + procs.getInt("DATA_TYPE") + logger.debug("Skipping metadata for: " + columnType + " " + procs.getInt("DATA_TYPE") +
" " + procs.getString("TYPE_NAME") + " " + procs.getBoolean("NULLABLE") + " " + procs.getString("TYPE_NAME") + " " + procs.getInt("NULLABLE") +
" (probably a member of a collection)" " (probably a member of a collection)");
);
} }
} }
else { else {
CallParameterMetaData meta = new CallParameterMetaData(columnName, columnType, CallParameterMetaData meta = new CallParameterMetaData(columnName, columnType,
procs.getInt("DATA_TYPE"), procs.getString("TYPE_NAME"), procs.getBoolean("NULLABLE") procs.getInt("DATA_TYPE"), procs.getString("TYPE_NAME"),
); procs.getInt("NULLABLE") == DatabaseMetaData.procedureNullable);
this.callParameterMetaData.add(meta); this.callParameterMetaData.add(meta);
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Retrieved metadata: " + meta.getParameterName() + " " + logger.debug("Retrieved metadata: " + meta.getParameterName() + " " +

Loading…
Cancel
Save