lundi 13 octobre 2014

Parse find through a join table


Vote count:

0




I'm using Parse and have the following entities..



User
----
fullName


and



Follow
----
follower (User)
followee (User)


I'd like to do a find on Users with the following criteria.



  1. Given some text, their name contains that text.

  2. There exists a Follow record where they are the follower and the current user is the followee.


I am currently trying something like this...



PFQuery *followQuery = [Follow query];
[followQuery whereKey:@"followee" equalTo:[PFUser currentUser]];

PFQuery *userQuery = [PFUser query];
[userQuery whereKey:@"fullName" containsString:theSearchText];

[userQuery whereKey:@"somethingHereButNotSureWhat" matchesQuery:followQuery];


Is there a way to get this to work that I'm missing? I don't seem to be able to get the query to work whatever I put in the key. I need to put self or . or something but nothing I have tried works.



asked 3 mins ago







Parse find through a join table

Aucun commentaire:

Enregistrer un commentaire