title: Querying for a pointer attribute using Parse
body: <p>Im developing an app with User and Request as classes on Parse. My Users have currentLocation (PFGeoPoint) as an attribute and Requests have a pointer to refer the User that owns the request (requestor:PFUser). So Im trying to find requests from users near to the current user logged in.</p>
  
  <p>I need to do something like:</p>
  
  <pre><code>let currentUserGeoPoint = PFUser.currentUser()!["currentLocation"] as! PFGeoPoint
  
  var query = PFQuery(className:"Request")
  query.whereKey("requestor.currentLocation", nearGeoPoint: currentUserGeoPoint)
  query.findObjectsInBackgroundWithBlock {
        (objects, error) -&gt; Void in
            if (error == nil) {
               self.userRequests = objects!
               self.tableView.reloadData()
            }else {
               println(error?.userInfo)
            }
  }
  </code></pre>
  
  <p>But unfortunatelly this is not possible:</p>
  
  <pre><code>[Error]: Dot notation can only be used on objects (Code: 102, Version: 1.8.1)
  Optional([code: 102, error: Dot notation can only be used on objects, temporary: 0, NSLocalizedDescription: Dot notation can only be used on objects])
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>This is how my Request Class looks like on Parse:</p>
  
  <p><a href="https://i.stack.imgur.com/MHChj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MHChj.png" alt="enter image description here"></a></p>
  
  <p>This is the User Class:</p>
  
  <p><a href="https://i.stack.imgur.com/4pgre.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4pgre.png" alt="enter image description here"></a></p>