Skip to content

Commit

Permalink
Fix wildcard SELECT column mapping on JOIN statements
Browse files Browse the repository at this point in the history
  • Loading branch information
gitblit committed Jun 29, 2015
1 parent 75c995b commit 8a8fb46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion releases.moxie
Expand Up @@ -9,7 +9,8 @@ r27: {
html: ~
text: ~
security: ~
fixes: ~
fixes:
- Fix column mapping on wildcard select JOIN statements
changes:
- Add support for PostgreSQL 9.5 UPSERT syntax
additions: ~
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/iciql/Db.java
Expand Up @@ -799,8 +799,7 @@ public <T> List<T> executeQuery(Class<? extends T> modelClass, String sql, Objec
}
rs = stat.executeQuery();
}
boolean wildcardSelect = sql.toLowerCase().startsWith("select *")
|| sql.toLowerCase().startsWith("select distinct *");
boolean wildcardSelect = sql.toLowerCase().matches("select .*\\*.+");
return buildObjects(modelClass, wildcardSelect, rs);
} catch (SQLException e) {
throw new IciqlException(e);
Expand Down

0 comments on commit 8a8fb46

Please sign in to comment.