title: Parse.com issues while querying array of pointers, .include not getting nested pointer data in cloud code
body: <p>I am having trouble getting data from the nested pointers in my array of pointers from a query. I have an array of pointers like so: [{"__type":"Pointer","className":"QuizData","objectId":"rmwJrV55c7"},{"__type":"Pointer","className":"QuizData","objectId":"2132q8i9np”}, etc…]</p>
  
  <p>That QuizData class also has a column named “ad” which is a Pointer to the “Ads” class. I can get the QuizData in a query using the following include statements on my query like so:</p>
  
  <pre><code>var __quizAdQueueQuery = new Parse.Query(QuizAdQueue);
  __quizAdQueueQuery.equalTo("user", __request.user);
  __quizAdQueueQuery.include("quizAdArr”);
  __quizAdQueueQuery.include(["quizAdArr.QuizData"]);
  </code></pre>
  
  <p>BUT Neither of these or both combined don’t work as when I try to get column data from the ad it’s always undefined:</p>
  
  <pre><code>__quizAdQueueQuery.include(["quizAdArr.QuizData.ad"]);
  __quizAdQueueQuery.include(["quizAdArr.QuizData.Ads"]);
  </code></pre>
  
  <p>This is my return from that query, where the column data "mediaType" that I am trying to access is always undefined:</p>
  
  <pre><code>return __quizAdQueueQuery.first().then(function(__resultsObj)
  {
  
    __quizQueueObj = __resultsObj;
    __userQuizQueueArr = __quizQueueObj.get("quizAdArr");
  
    var __quiz;
    var __ad;
    var __seenAd;
    var __lengthInt = __userQuizQueueArr.length;
    var __mediaTypeStr = __request.params.mediaType;
    var __matchedQuizzesArr = [];
  
    for (var __i = 1; __i &lt; __lengthInt; __i++)
    {
      __quiz = __userQuizQueueArr[__i];
      // console.log('__quiz.get("name") = '+__quiz.get("name"));
      __ad = __quiz.get("ad");
      // console.log("__ad.id = "+__ad.id);
      //THE MEDIA TYPE IS ALWAYS RETURNING UNDEFINED HERE!!!
      console.log('__ad.get("mediaType") = '+__ad.get("mediaType")+', __mediaTypeStr = '+__mediaTypeStr);
  
      if (__ad.get("mediaType") == __mediaTypeStr)
      {
        //put all matches in array to be sorted
        __matchedQuizzesArr.push(__userQuizQueueArr[__i]);
        console.log("__matchedQuizzesArr.length = "+__matchedQuizzesArr.length);
      }
    }
  
    return __matchedQuizzesArr;
  });
  </code></pre>
  
  <p>Thanks for any help you can give! I also posted this as a bug in the Parse/Facebook issue reporter but was redirected here, so if this is a bug I can reopen it: <a href="https://developers.facebook.com/bugs/923988310993165/" rel="nofollow">https://developers.facebook.com/bugs/923988310993165/</a></p>
  
  <p><strong>EDIT</strong> Here is the updated, working query with nested includes for clarity:</p>
  
  <pre><code>var __quizAdQueueQuery = new Parse.Query(QuizAdQueue);
  __quizAdQueueQuery.equalTo("user", __request.user);
  __quizAdQueueQuery.include('quizAdArr');
  __quizAdQueueQuery.include('quizAdArr.ad');
  </code></pre>