Skip to content

Commit fc6f00e

Browse files
committed
refactor: 优化nativeSQL别名支持
1 parent d6513d7 commit fc6f00e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/query/QueryAnalyzerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ private Map<String, Column> getColumnMappings() {
117117
if (!(column instanceof ExpressionColumn) && column.metadata != null) {
118118
columnMappings.put(column.metadata.getName(), col);
119119
columnMappings.put(select.table.alias + "." + column.metadata.getName(), col);
120+
columnMappings.put(column.metadata.getAlias(), col);
121+
columnMappings.put(select.table.alias + "." + column.metadata.getAlias(), col);
120122
}
121123
}
122124

0 commit comments

Comments
 (0)