我正在尝试通过成功注册将用户添加到现有的Parse.com角色。
//User has successfully signed up now that I have a cached currentUser we proceed to add them to the 'Moderator' Role:
PFQuery *roleQuery = [PFRole query];
[roleQuery whereKey:@"name" equalTo:@"Moderator"];
[roleQuery getFirstObjectInBackgroundWithBlock:^(PFObject *object, NSError *error) {
if (!error) {
PFRole *role = (PFRole *)object;
[role.users addObject:[PFUser currentUser]];
[role saveInBackground];
}
}];
但是,一旦他们的帐户处理我收到此错误:
[Error]: object not found for update (Code: 101, Version: 1.7.5)
主持人,是后端的活跃角色。有人可以帮助我克服这个障碍,并引导我朝着正确的方向前进。这是加重的。 Parse iOS指南中没有记录用于查询/将用户添加到现有角色的内容。