|
1 | 1 | /* |
2 | | - * Copyright 2002-2018 the original author or authors. |
| 2 | + * Copyright 2002-2020 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -172,7 +172,7 @@ public String getCatalogName() { |
172 | 172 | } |
173 | 173 |
|
174 | 174 | /** |
175 | | - * Secify the name of the schema. |
| 175 | + * Specify the name of the schema. |
176 | 176 | */ |
177 | 177 | public void setSchemaName(@Nullable String schemaName) { |
178 | 178 | this.schemaName = schemaName; |
@@ -354,16 +354,15 @@ protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters) |
354 | 354 | logger.debug("Using declared out parameter '" + paramName + |
355 | 355 | "' for function return value"); |
356 | 356 | } |
357 | | - setFunctionReturnName(paramName); |
| 357 | + this.actualFunctionReturnName = paramName; |
358 | 358 | returnDeclared = true; |
359 | 359 | } |
360 | 360 | } |
361 | 361 | } |
362 | 362 | } |
363 | 363 | setOutParameterNames(outParamNames); |
364 | 364 |
|
365 | | - List<SqlParameter> workParams = new ArrayList<>(); |
366 | | - workParams.addAll(declaredReturnParams); |
| 365 | + List<SqlParameter> workParams = new ArrayList<>(declaredReturnParams); |
367 | 366 | if (!provider.isProcedureColumnMetaDataUsed()) { |
368 | 367 | workParams.addAll(declaredParams.values()); |
369 | 368 | return workParams; |
@@ -393,8 +392,8 @@ protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters) |
393 | 392 | "Unable to locate declared parameter for function return value - " + |
394 | 393 | " add a SqlOutParameter with name '" + getFunctionReturnName() + "'"); |
395 | 394 | } |
396 | | - else if (paramName != null) { |
397 | | - setFunctionReturnName(paramName); |
| 395 | + else { |
| 396 | + this.actualFunctionReturnName = param.getName(); |
398 | 397 | } |
399 | 398 | } |
400 | 399 | else { |
@@ -422,7 +421,7 @@ else if (paramName != null) { |
422 | 421 | (StringUtils.hasLength(paramNameToUse) ? paramNameToUse : getFunctionReturnName()); |
423 | 422 | workParams.add(provider.createDefaultOutParameter(returnNameToUse, meta)); |
424 | 423 | if (isFunction()) { |
425 | | - setFunctionReturnName(returnNameToUse); |
| 424 | + this.actualFunctionReturnName = returnNameToUse; |
426 | 425 | outParamNames.add(returnNameToUse); |
427 | 426 | } |
428 | 427 | if (logger.isDebugEnabled()) { |
|
0 commit comments