Skip to content

Commit

Permalink
QueryBuilder: escape table name for JOIN as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondyhand committed Aug 21, 2018
1 parent 1d83ffc commit 8bb7232
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ private void checkLog(String sql) {
private void appendJoinsAndWheres(StringBuilder builder, String tablePrefixOrNull) {
values.clear();
for (Join<T, ?> join : joins) {
builder.append(" JOIN ").append(join.daoDestination.getTablename()).append(' ');
builder.append(" JOIN ");
builder.append('"').append(join.daoDestination.getTablename()).append('"').append(' ');
builder.append(join.tablePrefix).append(" ON ");
SqlUtils.appendProperty(builder, join.sourceTablePrefix, join.joinPropertySource).append('=');
SqlUtils.appendProperty(builder, join.tablePrefix, join.joinPropertyDestination);
Expand Down

0 comments on commit 8bb7232

Please sign in to comment.