ios - PFQuery using includekey -
i have 2 tables in parse.
- activity
- venues
activity holds 2 keys: userid , venueid. want query , retreive venue details in activity table.
i'm trying using this:
pfquery *query = [pfquery querywithclassname:quoactivityclassname]; [query wherekey:quoactivityfavoritesuserid equalto:[pfuser currentuser]]; [query includekey:quoactivityvenueid]; if (self.objects.count == 0) { query.cachepolicy = kpfcachepolicycachethennetwork; } return query;
this retrieves object how grab specific fields in venues table name, address, etc.
you can venue returned object pfquery as:
venue * venue = object[quoactivityvenueid];
you can do:
nsstring * venuename = object[quoactivityvenueid][some_name_id]; nsstring * venueaddress = object[quoactivityvenueid][some_address_id];
Comments
Post a Comment