title: In Parse.com cloud code, How to sort records by its child table
body: <p>This question is about sorting by Pointer object in Parse.com cloud code.</p>
  
  <p>I have an Class A object, and A.pointer is a Pointer object which point to Class B.</p>
  
  <p>And I want to sort A in database by B.sortfield.</p>
  
  <p>I've tried to use innerQuery like below, but seems not work.</p>
  
  <pre><code>        var query = new Parse.Query(A);
          var innerQuery = new Parse.Query(B);
          innerQuery.descending('sortfield');
          query.matchesQuery("pointer", innerQuery);
          query.......
  </code></pre>
  
  <p>Could anybody tell me how to do it? tnx!</p>