0

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?

Identity
  • 1,553
  • 1
  • 22
  • 44

1 Answers1

1

First of all, why don't you contact EasyQuery support on their web-site?

As for the question. I think the problem occurs because your second query is empty at the moment you are using it in addSimpleCondition function.

Additionally, it's better to use getObject function instead of accessing query property directly.

Sergiy
  • 1,912
  • 2
  • 16
  • 25