View Full Version : Store filtering, post params

26 Mar 2012, 7:36 AM
I have a store that is based on model; standard stuff.

I am applying a filter to this store via

store.filter({property: 'ID', value: '10'});

This creates a post parameters of

filter: [ { property: 'ID', value: 10 } ]

What I want to do is also to provide more information on that post ... like the property's "type" and the "comparison" operation. Today, this is assumed to be a comparison of "=" and a type of "string".

However, I cannot seem to find the means to achieve supplying parameters in the filter so that my server can be a bit more intelligent about how it will ultimately build the query to return results.

Can someone provide an example of what the store.filter() needs to be to accomplish this? Or do I need to override the store.filter function so that the parameters are included there?

Any help would be greatly appreciated.


26 Mar 2012, 8:41 AM
The property and value are created within the proxy and cannot be changed unless you created your own. To do this I would add an extraParam manually to the proxy to be used instead of using the filter.