Skip to content

Commit f6703c9

Browse files
committed
fix: 在Head Method,PG数据库 left join 副表 多个业务键关联,出现找不到column
1 parent 4636380 commit f6703c9

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)