Fetch objects on the basis of value in relation in where clause

Helllo Backendless
I am trying to fetch the data from a table ‘PartnerRequests’ by where clause on related user object but it is showing error
FAULT = ‘1017’ [Invalid where clause: Unknown column 'where clause] <Invalid where clause: Unknown column 'where clause>
here is my code
QueryOptions *queryOptions = [QueryOptions query];
queryOptions.relationsDepth = @1;
BackendlessDataQuery *query = [BackendlessDataQuery query];
query.queryOptions=queryOptions;
query.whereClause = [NSString stringWithFormat:@“senderUser = ‘%@’”,CURRENT_USER];
// also tried query.whereClause = [NSString
stringWithFormat:@“PartnerRequests[senderUser].objectId =
‘%@’”,[[CURRENT_USER.objectId componentsSeparatedByString:@"."]
objectAtIndex:0]];
[backendless.persistenceService find:[PartnerRequests class] dataQuery:query response:^(BackendlessCollection *collection) {
} error:^(Fault *error) {
NSLog(@"%@",error);
errorBlock(error);
}];
Please guide

here CURRENT_USER is backendless.userService.currentUser

Consider PartnerRequests.parent is BackebdlessUser 1:1 relation. Then your query.whereClause have to be:

 query.whereClause = [NSString stringWithFormat:@"partner.objectId = '%@'", backendless.userService.currentUser.objectId];

You should investigate the docs:

Thanks for your answer, I realized my mistake later, so corrected and its working fine.

Thanks