0

我正在尝试使用javascript轻松查询嵌套我的查询。

var query = new EQ.core.Query();
// fill in the query
var finalQuery = EQ.client.getQuery();
        finalQuery.addColumn({
          "caption": "Item",
          "sorting": "Ascending",
          "expr": {
            "typeName": "ENTATTR",
            "id": "Items.Id"
          }
        });

        query.setModel(finalQuery.getModel());
        finalQuery.addSimpleCondition({
          attr: "items.Name",
          operator: "InSubQuery",
          value: query.query
        });

这导致查询如下所示:

SELECT DISTINCT Items.Id AS Donor FROM selectiontool.Items AS Items WHERE
( Items .Name IN
( System.Collections.Generic.Dictionary`2[System.String,System.Object] ))按
项目排序

我怎样才能让它正常工作?

4

1 回答 1

1

首先,您为什么不在他们的网站上联系 EasyQuery 支持?

至于问题。addSimpleCondition我认为出现问题是因为您的第二个查询在您在函数中使用它时为空。

此外,最好使用getObject函数而不是query直接访问属性。

于 2018-03-28T17:04:57.753 回答