Start a new topic

Although claimed, KCSAppdataStore removeObject does not suppot query

I can use a NSArray to delete a bunch of entities. But when inputing a query to this function, "KCSAppdataStore removeObject:withCompletionBlock:withProgressBlock", it generates an error.



http://devcenter.kinvey.com/ios/guides/datastore#DeletingMultipleEntitiesatOnce

Yigit, can you help us understand the problem?


Thanks,

What's the error?
KinveyEntity.m:69 [ERROR] EXCEPTION Encountered: Name => UnsupportedFeatureException, Reason => This version of the Kinvey iOS library requires clients to override this method

2014-06-05 22:20:07.267 [21108:170f]

*** Terminating app due to uncaught exception 'UnsupportedFeatureException', reason: 'Object "" of type "KCSQuery" does not implement 'hostToKinveyPropertyMapping', a required 'KCSPersistable' method for saving the object to the backend'

*** First throw call stack:

(0x333e32a3 0x3b08897f 0x971a1 0x96e2f 0x96f4d 0xd0a33 0xbaac9 0x33ce8be3 0x3b4a011f 0x3b4ae259 0x3b4ae3b9 0x3b4d4a11 0x3b4d48a4)

libc++abi.dylib: terminate called throwing an exception
Can you provide code that reproduces this?
I also am seeing the same behavior using the IOS api. Is there something special that needs to be done when using KCSQuery in a removeObject call?



**EDIT** By same behavior, I mean specifically the following exception:



'UnsupportedFeatureException', reason: 'Object "" of type "KCSQuery" does not implement 'hostToKinveyPropertyMapping', a required 'KCSPersistable' method for saving the object to the backend'



It can be reproduced by the following





KCSQuery* objectQuery = [KCSQuery queryOnField:@"someField" withExactMatchForValue:valueToMatch];



[store removeObject:objectQuery withCompletionBlock:^(unsigned long count, NSError *errorOrNil) {

if(errorOrNil == nil)

{

//success

}

}withProgressBlock:nil];

Could you handle the Problem. I have same problem and I do not understand why?


Login or Signup to post a comment