deleteSql 删除主表时候同时删除外键表信息

  "deleteSql": {
    "delete": [
      {
        "sqlDelete": "delete from bt_policy_status where policy_id = @policyId",
        "tableName": "bt_policy_status",
        "primaryColumn": [
          {
            "isIdentity": false,
            "tableId": 5,
            "colName": "policy_id",
            "field": "policyId"
          }
        ]
      },
      {
        "sqlDelete": "delete from bt_policy_item where policy_id = @policyId",
        "tableName": "bt_policy_item",
        "primaryColumn": [
          {
            "isIdentity": false,
            "tableId": 10,
            "colName": "policy_id",
            "field": "policyId"
          }
        ]
      },
      {
        "sqlDelete": "delete from bt_policy where policy_id = @policyId",
        "tableName": "bt_policy",
        "primaryColumn": [
          {
            "isIdentity": false,
            "tableId": 15,
            "colName": "policy_id",
            "field": "policyId"
          }
        ]
      }
    ]
  },
文档更新时间: 2021-07-04 06:22   作者:admin