我无法在Parse中更新记录;错误:“找不到更新的对象(代码:101,版本:1.2.16)” [英] I can not update a record in Parse; Error: "object not found for update (Code: 101, Version: 1.2.16)"
问题描述
我正在使用Parse作为我的原生iOS应用程序之一的后端。
我无法在Parse中更新表中的记录。首先,我查询我想要更新它的对象。因此,objects数组返回1条记录,但是当我想更新它时,我得到以下错误;
I am using Parse as my backend for one of my native iOS app. I am not able to update a record on a table in Parse. First I query the object that I want to update it. So, "objects" array returns 1 record but when I want to update it I get the following error;
找不到更新的对象(代码:101,版本:1.2.16)
"object not found for update (Code: 101, Version: 1.2.16)"
那么什么你认为我无法更新Parse中的记录吗? (下面是我的代码)
So what do you think I can not update a record in Parse? (Below is my code)
谢谢,
E。
Thanks, E.
PFQuery *query = [PFQuery queryWithClassName:@"askedFriends"];
[query whereKey:@"questionID" equalTo:aqDt.questionID];
[query whereKey:@"fbID" equalTo:FbId];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
NSArray *postArray = objects;
PFObject *post = postArray.lastObject;
[post setObject:@"sentReply" forKey:btnSelection];
[post saveInBackground];
}
推荐答案
我遇到了同样的问题,它是特定Class表的ACL列。确保在ACL列中有这样的内容
I had the same problem, And it was the ACL column for that specific Class table. Ensure to have something like this in your ACL column
{"*":{"read":true},"tyb5CcKwBU":{"write":true,"read":true}}
* 允许所有人阅读。
您可以使用类似
The "*" allow the read to everyone. You can set client side using something like
ParseACL acl = new ParseACL(<YourObject>);
acl.setPublicReadAccess(true);
这篇关于我无法在Parse中更新记录;错误:“找不到更新的对象(代码:101,版本:1.2.16)”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!