1
Vote

Custom query options ignored

description

Hi,
 
when executing a DataServiceQuery only system query options (starting with $) are added to the query and custom query options are ignored.
Suggestion:
In class DataServiceQuery.m line 297:
 
if([queryOption hasPrefix:@"$"])
    query = [query stringByAppendingFormat:@"?%@",queryOption];
else if ([queryOption length] > 0)
    query = [query stringByAppendingFormat:@"?%@",queryOption];
 
Thanks,
Guy

comments

CTapang wrote Mar 4, 2011 at 11:06 PM

The logic suggested is equivalent to the following:

if ([queryOption length] > 0)
 query = [query stringByAppendingFormat:@"?%@", queryOption];
It means that any queryOption is valid as long as its length is more than zero. Is this correct?

CTapang wrote Mar 4, 2011 at 11:09 PM

The question "Is this correct?" refers to the logic, not the interpretation. In other words, can any non-zero length queryOption be valid?

CTapang wrote Mar 11, 2011 at 11:15 PM

Put equivalent logic in, fixed in Version 1.2.