title: Query Parse Relation with Object ID Only
body: <p>I want to conduct a Parse query on a class that has a relation column. From what I understand, I can't pass the entire relation object with a cloud function, I can only pass the <code>objectId</code> as a string.</p>
  
  <p>So in my iOS app, I pass the <code>objectId</code> like this:</p>
  
  <pre><code>PFCloud.callFunctionInBackground("customReport", withParameters: ["thing":thing.objectId]){ (response, error) -&gt; Void in
    println(response)
  }
  </code></pre>
  
  <p>Then in my Cloud code function: </p>
  
  <pre><code>Parse.Cloud.define("customReport", function(request, response) {
    var promises = []
  
    var query = new Parse.Query("MyClass")
  
    //Search for thing
    if(request.params.thing != ""){
      query.equalTo('thing',request.params.thing)
  
      var promise1 = query.find()
  
      promises.push(promise1) 
    }
  
    //...
  
  })
  </code></pre>
  
  <p>But this doesn't work because the <code>equalTo</code> statement expects a <code>thing</code> object, not an <code>objectId</code>.</p>
  
  <p><strong>Is there a way I can query a relation with just the <code>objectId</code>?</strong> Or do I have to query for the <code>thing</code> object using the <code>objectId</code> and <em>then</em> do the <code>equalTo</code> check?</p>