无法更新Parse上的数据

时间:2014-03-14 05:49:40

标签: ios iphone parse-platform insert-update pfquery

您好我在解析时更新我的​​数据有问题。

我在下面有这个代码..

PFQuery *query = [PFQuery queryWithClassName:@"RemittanceTable"];
[query whereKey:@"beneCode" equalTo:@"66gtbT"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
    if (!error) {
        // The find succeeded.
        // NSLog(@"BENE DETAILS: %d", objects.count);
        // Do something with the found objects
        for (PFObject *object in objects) {
            NSLog(@"%@", object.objectId);

            object[@"payoutRefNo"] = refNo;
            [object saveInBackground];
        }
    }else{
        // Log details of the failure
        NSLog(@"Error: %@ %@", error, [error userInfo]);
    }}];

我想要做的就是这样..(在sql语句中)

  

UPDATE RemittanceTable SET payoutRefNo ='RM4323'WHERERE objectId ='66gtbT'

我收到错误声明......

  

RIB [878:4d03]错误:找不到更新的对象(代码:101,版本:1.2.18)

请帮我解决这个问题。如果一直在寻找互联网,他们中的大多数告诉我应该在数据浏览器表上有acl ...我有一个ACL字段的值..

  

{ “*”:{ “读”:真}, “pXE8AuiGdA”:{ “写”:真, “读”:真}}

使用NSLOG ..这是输出..

RIB[954:60b] <RemittanceTable:Ncw9M79YbG:(null)> {
ACL = "<PFACL: 0x17df68a0>";
beneCode = 66gtbT;
beneMessage1 = "Allowance.";
beneMessage2 = "";
beneMobileNo = 09328694928;
beneName = "Lorraine Gomez";
payoutAccount = "";
payoutAddress = "";
payoutBank = "";
payoutMode = "";
payoutRefNo = "";
payoutZipCode = "";
remittanceAmount = "3000.00";
remitterAddress = "Camarin, Caloocan City";
remitterEmail = "ida.mayer@gmail.com";
remitterGender = Female;
remitterMobileNo = 09328694928;
remitterName = "Ida Mayer";
remitterRefNo = SMXGXc;
sourceAccount = "0009891123 - JOSE SANTOS";
status = 0;

}

1 个答案:

答案 0 :(得分:0)

删除ACL代码以在解析时创建ACL值。这将限制编辑从Android到iO的数据,反之亦然。