From 2be8f073a488cab3a946fb2ada44dc80cf74cba1 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Tue, 17 Apr 2018 23:07:34 -0400 Subject: [PATCH] Use correct variable name to work inside lambdas --- .../jdbc/codegen/CompileTimeRowToObjectMapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdbcmapper/src/main/java/com/moparisthebest/jdbc/codegen/CompileTimeRowToObjectMapper.java b/jdbcmapper/src/main/java/com/moparisthebest/jdbc/codegen/CompileTimeRowToObjectMapper.java index 9ddf5dd..b352cdd 100644 --- a/jdbcmapper/src/main/java/com/moparisthebest/jdbc/codegen/CompileTimeRowToObjectMapper.java +++ b/jdbcmapper/src/main/java/com/moparisthebest/jdbc/codegen/CompileTimeRowToObjectMapper.java @@ -320,7 +320,7 @@ public class CompileTimeRowToObjectMapper { } if (resultSetConstructor) { - java.append("final ").append(tType).append(" ret = new ").append(tType).append("(rs);\n"); + java.append("final ").append(tType).append(" ret = new ").append(tType).append("(").append(_resultSetName).append(");\n");; finishIfNeeded(java); return; } @@ -351,7 +351,7 @@ public class CompileTimeRowToObjectMapper { } } else // we want a generic object type for (int x = 1; x < columnLength; ++x) - java.append("ret.put(").append(escapeMapKeyString(keys[x].toLowerCase())).append(", rs.getObject(").append(String.valueOf(x)).append("));\n"); + java.append("ret.put(").append(escapeMapKeyString(keys[x].toLowerCase())).append(", ").append(_resultSetName).append(".getObject(").append(String.valueOf(x)).append("));\n"); return; } catch (Throwable e) { throw new MapperException(e.getClass().getName() + " when trying to create a Map