Parse Unpin 不会从本地数据存储中删除对象 [英] Parse Unpin Does Not Remove Object From Local Datastore
本文介绍了Parse Unpin 不会从本地数据存储中删除对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这应该可行.
这是解决这个问题的众多尝试之一
Here is one of many attempts to get this figured out
myTrainingSessions[indexPath.row].unpinInBackgroundWithBlock{ (succ, e) -> Void in
if succ == true {
// just remove from table view etc
self.myTrainingSessions[indexPath.row].deleteEventually()
self.myTrainingSessions.removeAtIndex(indexPath.row)
self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
// Shows that my object is still in datastore!
// object should be UNPINNED - but appers in this result....
var query = PFQuery(className:TrainingSession.parseClassName())
query.whereKey(self.userType(), equalTo: PFUser.currentUser())
query.orderByDescending("createdAt")
query.fromLocalDatastore().ignoreACLs()
query.findObjectsInBackgroundWithBlock { (objects, error) -> Void in
if error != nil { return }
if let result = objects as? [TrainingSession] {
println("local results")
println(result)
}
}
}
}
我在取消固定后进行了查询,对象仍然存在.
I do a query after unpinning and the object is still there.
推荐答案
我已经联系了支持团队关于您无法取消固定具有引用对象的对象的问题,因此我正在为这些人共享线程有兴趣:
I've contacted the support team about the problem where you can't unpin an object that has a referenced object, so I'm sharing the thread for those interested:
https://developers.facebook.com/bugs/138298746504630/
支持人员说这是设计使然,但在我要求改进此规范时,他告诉我他会告诉团队这件事.
The support person said it was By Design, but upon my request to improve this specification, he told me he would tell the team about it.
这篇关于Parse Unpin 不会从本地数据存储中删除对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文