| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6350,12 +6350,9 @@ LEFT JOIN ( SELECT count(*) AS count FROM sys.Comment ) AS Comment ON Comment.m | |||
| 6350 | 6350 | //解决 pg 如果只查询关联键,会报找不到column的错误 | |
| 6351 | 6351 | ///* SELECT count(*) AS count FROM sys.Moment AS Moment | |
| 6352 | 6352 | // LEFT JOIN ( SELECT * FROM sys.Comment ) AS Comment ON Comment.momentId = Moment.id LIMIT 1 OFFSET 0 */ | |
| 6353 | - if (joinConfig.isMySQL()) { | ||
| 6354 | - if (column != null) { | ||
| 6355 | - for (On on : onList) { | ||
| 6356 | - column.add(on.getKey()); | ||
| 6357 | - } | ||
| 6358 | - | ||
| 6353 | + if (column != null && joinConfig.isMSQL()) { // 暂时这样兼容 PostgreSQL 等不支持 SELECT 中不包含对应 key 的隐式 ON 关联字段的数据库 | ||
| 6354 | + for (On on : onList) { | ||
| 6355 | + column.add(on.getKey()); // TODO PostgreSQL 等需要找到具体的 targetTable 对应 targetKey 来加到 SELECT,比直接 SELECT * 性能更好 | ||
| 6359 | 6356 | } | |
| 6360 | 6357 | } | |
| 6361 | 6358 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments