ict.ken.be

 

Breeze and OData case sensitive

Related Posts

Categories: Javascript

When using Breezejs with OData you have to keep in mind that the contains filter is case sensitive. This is because the OData standard is case sensitive. Which might seem ridiculous at first, but going from case sensitive into case insensitve is easier then the other way around. Anyway here is the solution for those who make search boxes case insensitive like the rest of us.

var query = breeze.EntityQuery.from('SearchView');
query = query.where("tolower(Description)", breeze.FilterQueryOp.Contains, filterOptions.filterText.toLowerCase());
manager.executeQuery(query).then(querySuccess).fail(queryFailed);