APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

连接字段只能有一个

Open GITWEIZ opened this issue 3 years ago • 1 comments

环境信息

  • 系统: Windows 10
  • JDK: 1.8.0_17
  • 数据库: MySQL 8.0.28
  • APIJSON: 4.9.1

问题描述

在进行两个表的连接操作时,用于连接的字段只能有一个 数据库结构和数据如下: image image image image 查询的apijson:

{
  "[]": {
    "join": "&/Lrx_sum_score/sid@,&/Lrx_sum_score/cid@",
    "Lrx_score": {
    },
    "Lrx_sum_score": {
      "sid@": "/Lrx_score/sid",//连接字段不能有两个
      "cid@": "/Lrx_score/cid"
    }
  },
  "@schema": "lrx"
}

执行结果: image

错误信息

GITWEIZ avatar Apr 07 '22 00:04 GITWEIZ

升级下版本,5.0 已支持多个 JOIN ON 关联条件 增强各种功能;腾讯负责人公开称赞;登记万科发起的采筑电商 https://github.com/Tencent/APIJSON/releases/tag/5.0.0

TommyLemon avatar Apr 07 '22 12:04 TommyLemon

正确示例:

{
  "[]": {
    "join": "&/Lrx_sum_score",//连接字段可以有两个了
    "Lrx_score": {
    },
    "Lrx_sum_score": {
      "sid@": "/Lrx_score/sid",
      "cid@": "/Lrx_score/cid"
    }
  },
  "@schema": "lrx"
}

ifooling avatar Oct 13 '22 09:10 ifooling