ios - Parse query returning nil -


i doing query , checking see if value in column "parent", pointer, equal string, newlogobjectid. cannot since pointer , string different value type, (returns nil). when @ data in parse, notice in parent column, objectid listed, within button, when clicked, load newlog class.
how change "parent" objectid in pointer in code "query1.wherekey("parent", equalto:newlogobjectid)"? "parent.objectid"

    //objectid of row of marker selected, string, example, "mcekmyxrit"     let newlogobjectid = objectidarray[markerindex]      //query comparablephotos class     let query1 = pfquery(classname: "comparablephotos")      //grab rows of parent, equal newlogobjectid ex: "mcekmyxrit"     //issue: "parent" pointer, not string.  parent has objectid     query1.wherekey("parent", equalto:newlogobjectid)      //get result object     viewrecordobject = query1.findobjects() as! [pfobject] 

enter image description here

in experience, when comes images pictures or big data better use findobjectsinbackgroundwithblock method

   var query = pfquery(classname:"") findobjectsinbackgroundwithblock {   (objects: [anyobject]?, error: nserror?) -> void in {      if error == nil{       // whatever want         if let data = objects as![pfobject]{        // append array data        // self.arrayofobjects.append(data)         }        }   } 

method because let check error , make easier add objects array.


Comments