File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
APIJSONORM/src/main/java/apijson/orm Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -6325,12 +6325,9 @@ LEFT JOIN ( SELECT count(*) AS count FROM sys.Comment ) AS Comment ON Comment.m
63256325 //解决 pg 如果只查询关联键,会报找不到column的错误
63266326 ///* SELECT count(*) AS count FROM sys.Moment AS Moment
63276327 // LEFT JOIN ( SELECT * FROM sys.Comment ) AS Comment ON Comment.momentId = Moment.id LIMIT 1 OFFSET 0 */
6328- if (joinConfig .isMySQL ()) {
6329- if (column != null ) {
6330- for (On on : onList ) {
6331- column .add (on .getKey ());
6332- }
6333-
6328+ if (column != null && joinConfig .isMSQL ()) { // 暂时这样兼容 PostgreSQL 等不支持 SELECT 中不包含对应 key 的隐式 ON 关联字段的数据库
6329+ for (On on : onList ) {
6330+ column .add (on .getKey ()); // TODO PostgreSQL 等需要找到具体的 targetTable 对应 targetKey 来加到 SELECT,比直接 SELECT * 性能更好
63346331 }
63356332 }
63366333
You can’t perform that action at this time.
0 commit comments