Delivering solid user friendly software solutions since the dawn of time.

Breeze and OData case sensitive

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());