Skip to content

Commit

Permalink
substituteNamedParameters detects and unwraps SqlParameterValue objec…
Browse files Browse the repository at this point in the history
…ts (SPR-9052)
  • Loading branch information
jhoeller committed Feb 11, 2012
1 parent 66bc214 commit 1e1f8c9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ public static String substituteNamedParameters(ParsedSql parsedSql, SqlParameter
actualSql.append(originalSql.substring(lastIndex, startIndex));
if (paramSource != null && paramSource.hasValue(paramName)) {
Object value = paramSource.getValue(paramName);
if (value instanceof SqlParameterValue) {
value = ((SqlParameterValue) value).getValue();
}
if (value instanceof Collection) {
Iterator entryIter = ((Collection) value).iterator();
int k = 0;
Expand Down

0 comments on commit 1e1f8c9

Please sign in to comment.