Hey guys, I am having trouble in updating document.

Can someone help me in understanding how updating works?

   - save on Model
   - update on Document
   - putProperties on Document

So far I have update working only if I am updating contents in do-while 
loop like following:

do {
        docContent = [doc.properties mutableCopy];
        [docContent setObject:[NSNumber numberWithInt:123456789] 
forKey:@"entry_date"];
        [docContent setObject:[NSNumber numberWithInt:987654321] 
forKey:@"user_id"];
        [doc putProperties:docContent error:&error];
    } while ([error.domain isEqualToString: CBLHTTPErrorDomain] && 
error.code == 409);

I don't want to change objects in do-while loop, am I missing anything?

model does have valid document and I am not getting any error on update.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5ebdf6f6-675e-486d-8520-5741a3fcdf27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to