title: Retrieving objects with pointers in Parse
body: <p>I have a database schema which includes two tables in parse: contacts &amp; contactRelationships.</p>
  
  <p>Contacts includes a list of contacts, contactRelationships ties users together to form a relationship, i.e:</p>
  
  <pre><code>Contacts
  userid: 1, username: Bob
  userid: 2, username: Alice
  userid: 3, username: Chris
  
  
  ContactRelationships
  friend_A: 1, friend_B: 2 --&gt; Bob and Alice are friends
  friend_A: 2, friend_B: 3 --&gt; Alice and Chris are friends
  </code></pre>
  
  <p>I want to construct a query such as: "SELECT * FROM ContactRelationships WHERE friend_A = 1 AND friend_B = 2".</p>
  
  <p>The problem I'm having right now is that in Parse, I'm storing <strong>pointers</strong> to the contacts, and I'm trying to construct a query, but I don't have the pointers stored in local data (core data). I only have the user ids stored.</p>
  
  <p>Is there any way to do this without having to change the database to store userid strings instead of pointers?</p>