Limitations of query analysis queries contained in a list of pointers (where, $ in)

I have two tables in Parse: Productand Introduction.

The introduction has a pointer column Productand a string column status.

enter image description here

I can easily get all the input data with the status "live, validated" with the following parameters in my request to enter GET (analysis documentation) :

{
    where =     {
        status =         {
            "$in" =             (
                live,
                validated
            );
        };
    };
}

Now I would like to get all Introductions with, for example, all id egal products up to "Jpun01VJ3c, AkxTvIdZTQ".

I am trying to execute the following parameters (I am also trying to use only the ObjectId array inside $in: "$ in" = (Jpun01VJ3c, AkxTvIdZTQ);).

{
    where =     {
        product =         {
            "$in" =             (
                                {
                    "__type" = Pointer;
                    className = Product;
                    objectId = Jpun01VJ3c;
                },
                                {
                    "__type" = Pointer;
                    className = Product;
                    objectId = AkxTvIdZTQ;
                }
            );
        };
    };
}

So the question is: How can we do to get an introduction with a list of products?

- ?

ps: , :

{
    where =     {
        product =         {
            "__type" = Pointer;
            className = Product;
            objectId = Jpun01VJ3c;
        };
    };
}

+4
1

matchesQuery containedIn.

JS, :

var productQuery = new Parse.Query("Product");
productQuery.containedIn("objectId", [ YOUR LIST OF IDs ]);

var introductionQuery = new ParseQuery("Introduction");
introductionQuery.matchesQuery("product", productQuery);
introductionQuery
  .find()
  .then(function(introductions) {
    [...]
  });

iOS: https://parseplatform.imtqy.com/Parse-SDK-iOS-OSX/api/Classes/PFQuery.html#/c:objc(cs)PFQuery(im)whereKey:matchesQuery:

+1

Source: https://habr.com/ru/post/1668611/


All Articles