title: Parse query on pointer column
body: <p>I've already kind of asked this question, but i'm going to try to be more specific in the hope of being a little clearer.</p>
  
  <p>I have a xamarin Android project, using Parse.com as the back end. I have two tables (or classes), one which contains a list of beacons (called Beacons), and one which contains a list of categories (called BeaconCat). The headings of the table for the beacons class looks like:</p>
  
  <pre><code>ObjectID   |  minor  | major  |  CatID (this is the 'pointer' column to BeaconCat)
  111111     |  200     |  999  |   12345
  </code></pre>
  
  <p>The headings of the BeaconCat class looks like:</p>
  
  <pre><code>   ObjectID  |  Category
      12345    |   Sports
  </code></pre>
  
  <p>All i'm trying to do, is run a query that passes in a 'minor' number, that number gets looked up in the first table, and returns the value of the category column in the second table.</p>
  
  <p>So in the example above, i want to pass in the minor of 200, and get back the string 'sports'.</p>
  
  <p>Seems like it should be very easy but i'm really struggling.</p>
  
  <p>I've been trying variations of the following:</p>
  
  <pre><code>public async void getBeaconCat(Int32 minor)
    {
      try{
  
              var innerQuery = ParseObject.GetQuery("Beacons");
              innerQuery.WhereEqualTo("minor", minor);
              innerQuery.Include("CatID");
  
              var newQuery = ParseObject.GetQuery("BeaconCat");
              newQuery.WhereMatchesQuery("Category", innerQuery);
  
              IEnumerable&lt;ParseObject&gt; Myresults = await innerQuery.FindAsync();
  
              foreach (var result in Myresults)
               {
  
                  var category = result.Get&lt;string&gt;("Category");
                  Console.WriteLine ("Category is " + category);
               }
  
              }
                  catch{
                      Console.WriteLine ("There was a problem fetching data from parse");
              }
  
          }
  </code></pre>
  
  <p>Anything i try just seems to go straight to the catch and not return a string value.</p>
  
  <p>Any help on this appreciated.</p>