Skip to content

Commit a05e2e2

Browse files
authored
fix: PG count join 报错找不到 column,感谢 wz11wz 的贡献 Tencent#825
Tencent#825
2 parents 4636380 + f6703c9 commit a05e2e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6324,7 +6324,10 @@ LEFT JOIN ( SELECT count(*) AS count FROM sys.Comment ) AS Comment ON Comment.m
63246324
List<String> column = onList == null ? null : new ArrayList<>(onList.size());
63256325
if (column != null) {
63266326
for (On on : onList) {
6327-
column.add(on.getKey());
6327+
//解决 pg 如果只查询关联键,会报找不到column的错误
6328+
///* SELECT count(*) AS count FROM sys.Moment AS Moment
6329+
// LEFT JOIN ( SELECT * FROM sys.Comment ) AS Comment ON Comment.momentId = Moment.id LIMIT 1 OFFSET 0 */
6330+
//column.add(on.getKey());
63286331
}
63296332
}
63306333

0 commit comments

Comments
 (0)