hey guys i have a table A which has a pointer to Table B. I am trying to query Table A where Table B created At is less than today
Table A (columns)
objectId, Name, Table B pointer, ....
Table B
objectId, EndDate
So far I have this
let query = PFQuery(className:Globals.ParseObjects.ProLeagueWinnings)
query.fromLocalDatastore()
query.fromPinWithName("XXX")
query.includeKey("TableB")
query.whereKeyExists("TableB")
query.whereKey("TableB.EndDate", lessThanOrEqualTo: NSDate())
query.findObjectsInBackground().continueWithSuccessBlock {
(task: BFTask!) -> AnyObject! in
let leagues = task.result as? [ProLeagueWinnings]
if (completion != nil){
if leagues != nil{
completion!(leagues!)
}else{
completion!([])
}
}
return task
}
But it returns everything.