Search code examples
quickblox

QuickBlox - How to get create custom query


I need to get some Custom Objects but I need to check if two fields contain the value I pass.

NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
[parameters setValue:@"188888" forKey:@"user_id"];
[parameters setValue:@"188888" forKey:@"sent_to"];

[QBCustomObjects objectsWithClassName:@"Messages" extendedRequest:parameters delegate:self];

What I need is to check if the first parameter OR the second parameter are satisfied. With the code above I get a response as if a query was build like "user_id = 188888 AND sent_to = 188888".

Thanks in advance!


Solution

  • Operator OR is not supported in Custom Objects API yet.

    I propose you to make 2 separates queries and than merge 2 results in client application