Skip to content

Commit bc8dcbb

Browse files
author
Florent Bécart
committed
Bug Fix: the column deparser should use the table alias if any
1 parent 8b0b865 commit bc8dcbb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ public void visit(SubSelect subSelect) {
248248
}
249249

250250
public void visit(Column tableColumn) {
251-
String tableName = tableColumn.getTable().getWholeTableName();
251+
String tableName = tableColumn.getTable().getAlias();
252+
if (tableName == null) {
253+
tableName = tableColumn.getTable().getWholeTableName();
254+
}
252255
if (tableName != null) {
253256
buffer.append(tableName + ".");
254257
}

0 commit comments

Comments
 (0)