我正在尝试使用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] ))按
项目排序
我怎样才能让它正常工作?