aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/iciql/Query.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/iciql/Query.java')
-rw-r--r--src/main/java/com/iciql/Query.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/iciql/Query.java b/src/main/java/com/iciql/Query.java
index d1528e8..e9404ec 100644
--- a/src/main/java/com/iciql/Query.java
+++ b/src/main/java/com/iciql/Query.java
@@ -291,7 +291,11 @@ public class Query<T> {
List<T> result = Utils.newArrayList();
TableDefinition<T> def = from.getAliasDefinition();
SQLStatement stat = getSelectStatement(distinct);
- def.appendSelectList(stat);
+ if (isJoin()) {
+ def.appendSelectList(stat, from.getAs());
+ } else {
+ def.appendSelectList(stat);
+ }
appendFromWhere(stat);
ResultSet rs = stat.executeQuery();
try {