I am trying to nest my queries with easy query by using 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
});
This result in a query looking like this:
SELECT DISTINCT Items.Id AS Donor FROM selectiontool.Items AS Items WHERE
( Items .Name IN
(System.Collections.Generic.Dictionary`2[System.String,System.Object]))
ORDER BY Items
How do I get this working correctly?