As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Maybe. This will remove any objects where it's user._id field is the same as self.userId, and loved._id is the same as lovedOneID.
You may want to try querying first just to see if there any objects that match the query. Also is there an error? How are you verifying that nothing is removed?
N
Neto Leal
said
over 9 years ago
Michael, I did that. Querying with the same KCSQuery object, returns one object from server.
I'm verifying by looking into the database and also the NSLog says "removed: 0"
Error Domain=KCSAppDataErrorDomain Code=401 "Entity operation was unsuccessful." UserInfo=0x153aa770 {NSLocalizedDescription=Entity operation was unsuccessful., kinveyRequestId=0989fbb4fa944701afdb294b96ad96a4, kinveyInternalErrorString=, NSLocalizedFailureReason=, NSErrorFailingURLStringKey=https://baas.kinvey.com/appdata/kid_TeQ3pmb__f/Loved/528227227198081e7d000022, kinveyErrorCode=InsufficientCredentials, NSLocalizedRecoverySuggestion=Retry request based on information in `NSLocalizedFailureReasonErrorKey`}
Neto Leal
Is my code right?
KCSQuery *q = [KCSQuery query];
[q addQueryOnField:@"user._id" withExactMatchForValue:self.userId];
[q addQueryOnField:@"loved._id" withExactMatchForValue:lovedOneID];
NSLog(@"%@", [q JSONStringRepresentation]);
[[Loved appDataStore] removeObject:q withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {
NSLog(@"removed: %@, %@", objectsOrNil, errorOrNil);
completeBlock( objectsOrNil, errorOrNil );
} withProgressBlock:^(NSArray *objects, double percentComplete) {
}];
Thank you