2

This question is about sorting by Pointer object in Parse.com cloud code.

I have an Class A object, and A.pointer is a Pointer object which point to Class B.

And I want to sort A in database by B.sortfield.

I've tried to use innerQuery like below, but seems not work.

        var query = new Parse.Query(A);
        var innerQuery = new Parse.Query(B);
        innerQuery.descending('sortfield');
        query.matchesQuery("pointer", innerQuery);
        query.......

Could anybody tell me how to do it? tnx!

lewis
  • 2,936
  • 2
  • 37
  • 72
albertshaw
  • 96
  • 8

1 Answers1

1

Found below answers, Parse does not support such query. It really disappointed me.

sort-a-query-based-on-a-data-in-another-table and rest-api-sorting-query-through-a-pointer

albertshaw
  • 96
  • 8
  • The querying options in Parse are very very limited when working with more than one object :( – lewis Jun 26 '15 at 15:54