Visitar URL original
fix: 在Head Method,PG数据库 left join 副表 多个业务键关联,出现找不到column by wz11wz · Pull Request #825 · APIJSON/APIJSON · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6324,7 +6324,10 @@ LEFT JOIN ( SELECT count(*) AS count FROM sys.Comment ) AS Comment ON Comment.m
List<String> column = onList == null ? null : new ArrayList<>(onList.size());
if (column != null) {
for (On on : onList) {
column.add(on.getKey());
//解决 pg 如果只查询关联键,会报找不到column的错误
///* SELECT count(*) AS count FROM sys.Moment AS Moment
// LEFT JOIN ( SELECT * FROM sys.Comment ) AS Comment ON Comment.momentId = Moment.id LIMIT 1 OFFSET 0 */
//column.add(on.getKey());
}
}

Expand Down