我试图删除一个PFObject,但是我收到了这个错误:
[Error]: object not found for delete (Code: 101, Version: 1.7.0)
这里是我的代码
var newQuery = PFQuery(className: "Transfer")
newQuery.getObjectInBackgroundWithId(object.objectId!, block: { (newObject, error) -> Void in
if error == nil {
println("newObjectId : \(newObject!.objectId)")
newObject!.deleteInBackgroundWithBlock( { (success, err) -> Void in
if error == nil {
if success {
println("Deleted Successfully")
}
} else {
println("Error : \(err?.localizedDescription) \(err?.userInfo)")
}
})
} else {
println("Error : \(error?.localizedDescription) \(error?.userInfo)")
}
})
我println()我获取的newObject的一些值,一切都是正确的,所以我不明白为什么它找不到删除的对象?