【发布时间】:2014-11-21 18:33:19
【问题描述】:
我有 2 个班级:User、Books
在User 表中我有:objectId,AuthorName
在Books 表中我有:objectId、BookName、authorIDptr
AuthorIDptr 是指向User 类的指针
当我运行这个查询时:
var bookQuery = PFQuery(className:"Books")
bookQuery.whereKey("authorIDptr", equalTo: PFUser.currentUser().objectId)
bookQuery.includeKey("authorIDptr")
var userQuery = PFUser.query()
userQuery.whereKey("BookName", matchesKey: "Curious George", inQuery: bookQuery)
userQuery.findObjectsInBackgroundWithBlock {....
我收到以下错误:
Error: Error Domain=Parse Code=102 "The operation could not be completed. (Parse error 102.)" UserInfo=0x7ff2e26f4660 {error=pointer field authorIDptr需要一个指针值,code=102} { 代码 = 102; error = "指针字段 authorIDptr 需要一个指针值"; }
类中填充了数据。当我单击Books 类中的指针时,它会加载相应的User 类记录。
谁能帮我看看我做错了什么。
我想要发生的事情:我希望一本书的所有AuthorNames 都显示在 tableview 中。
谢谢,
丹尼斯
【问题讨论】:
标签: pointers swift parse-platform pfuser