Merge branch '5.2.x'
# Conflicts: # spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java
This commit is contained in:
@@ -66,12 +66,11 @@ public abstract class StatementCreatorUtils {
|
||||
* completely, i.e. to never even attempt to retrieve {@link PreparedStatement#getParameterMetaData()}
|
||||
* for {@link StatementCreatorUtils#setNull} calls.
|
||||
* <p>The default is "false", trying {@code getParameterType} calls first and falling back to
|
||||
* {@link PreparedStatement#setNull} / {@link PreparedStatement#setObject} calls based on well-known
|
||||
* behavior of common databases. Spring records JDBC drivers with non-working {@code getParameterType}
|
||||
* implementations and won't attempt to call that method for that driver again, always falling back.
|
||||
* <p>Consider switching this flag to "true" if you experience misbehavior at runtime, e.g. with
|
||||
* a connection pool setting back the {@link PreparedStatement} instance in case of an exception
|
||||
* thrown from {@code getParameterType} (as reported on JBoss AS 7).
|
||||
* {@link PreparedStatement#setNull} / {@link PreparedStatement#setObject} calls based on
|
||||
* well-known behavior of common databases.
|
||||
* <p>Consider switching this flag to "true" if you experience misbehavior at runtime,
|
||||
* e.g. with connection pool issues in case of an exception thrown from {@code getParameterType}
|
||||
* (as reported on JBoss AS 7) or in case of performance problems (as reported on PostgreSQL).
|
||||
*/
|
||||
public static final String IGNORE_GETPARAMETERTYPE_PROPERTY_NAME = "spring.jdbc.getParameterType.ignore";
|
||||
|
||||
@@ -266,7 +265,7 @@ public abstract class StatementCreatorUtils {
|
||||
}
|
||||
else if (databaseProductName.startsWith("DB2") ||
|
||||
jdbcDriverName.startsWith("jConnect") ||
|
||||
jdbcDriverName.startsWith("SQLServer")||
|
||||
jdbcDriverName.startsWith("SQLServer") ||
|
||||
jdbcDriverName.startsWith("Apache Derby")) {
|
||||
sqlTypeToUse = Types.VARCHAR;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public class CallMetaDataContext {
|
||||
logger.debug("Using declared out parameter '" + paramName +
|
||||
"' for function return value");
|
||||
}
|
||||
setFunctionReturnName(paramName);
|
||||
this.actualFunctionReturnName = paramName;
|
||||
returnDeclared = true;
|
||||
}
|
||||
}
|
||||
@@ -393,8 +393,8 @@ public class CallMetaDataContext {
|
||||
"Unable to locate declared parameter for function return value - " +
|
||||
" add an SqlOutParameter with name '" + getFunctionReturnName() + "'");
|
||||
}
|
||||
else if (paramName != null) {
|
||||
setFunctionReturnName(paramName);
|
||||
else {
|
||||
this.actualFunctionReturnName = param.getName();
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -422,7 +422,7 @@ public class CallMetaDataContext {
|
||||
(StringUtils.hasLength(paramNameToUse) ? paramNameToUse : getFunctionReturnName());
|
||||
workParams.add(provider.createDefaultOutParameter(returnNameToUse, meta));
|
||||
if (isFunction()) {
|
||||
setFunctionReturnName(returnNameToUse);
|
||||
this.actualFunctionReturnName = returnNameToUse;
|
||||
outParamNames.add(returnNameToUse);
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user