I have a database schema which includes two tables in parse: contacts & contactRelationships.
Contacts includes a list of contacts, contactRelationships ties users together to form a relationship, i.e:
Contacts
userid: 1, username: Bob
userid: 2, username: Alice
userid: 3, username: Chris
ContactRelationships
friend_A: 1, friend_B: 2 --> Bob and Alice are friends
friend_A: 2, friend_B: 3 --> Alice and Chris are friends
I want to construct a query such as: "SELECT * FROM ContactRelationships WHERE friend_A = 1 AND friend_B = 2".
The problem I'm having right now is that in Parse, I'm storing pointers 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.
Is there any way to do this without having to change the database to store userid strings instead of pointers?