解析Unpin不会从本地数据存储中删除对象 [英] Parse Unpin Does Not Remove Object From Local Datastore

查看:117
本文介绍了解析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://开发人员。 facebook.com/bugs/138298746504630/

支持人员称这是By Design,但根据我的要求改进此规范,他告诉我他会告诉团队。

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.

这篇关于解析Unpin不会从本地数据存储中删除对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆