1
我正在做一个查询,并且正在检查列“Parent”(它是一个指针)中的值是否等于字符串newLogObjectId。我显然不能这样做,因为指针和字符串是不同的值类型,(返回nil)。如何将字符串与指针中的字符串进行比较?解析中的查询指针(ios)
//A string, for example, "MCeKMyxRIt"
let newLogObjectId = objectIdArray[markerIndex]
let query1 = PFQuery(className: "ComparablePhotos")
//"Parent" is a pointer referencing an objectId in another class. "newLogObjectId" is a string How do I check to see if the String of Parent is equal to newLogObjectId, a string?
query1.whereKey("Parent", equalTo:newLogObjectId)
谢谢,我试过了,但NewLog正在抛出一个错误。 “使用未声明的类型NewLog” –
谢谢。我还有一个关于parentPointer的错误....它的“使用未解析的标识符”parentPointer'“ –
必须删除第一次编辑时的变量声明,我的错误!这现在应该适合你。 –