Breeze / breeze.js

Breeze for JavaScript clients
MIT License
537 stars 88 forks source link

SharePoint query fails on boolMethodExpr operation #57

Open dranovsk opened 9 years ago

dranovsk commented 9 years ago

I'm using breezejs with SharePoint 2013. One of the issues I'm having related to boolMethodExpr treatment, i.e. query fails when result of substringof compared to Boolean: substringof(expr2Val, expr1Val) eq true fails with "query is not valid" error, substringof(expr2Val, expr1Val) works fine. For now I'm overriding toODataFragmentVisitor binaryPredicate visitor.

Would you consider removing "eq true" comparison for boolMethodExpr as ABNF for OData v3 does not required it.

Thank you.

wardbell commented 9 years ago

Wow. This is annoying. Because in v.2 that was THE ONLY way you could write it. Now suddenly SharePoint decides that v2 syntax is illegal? So much for backward compat.

I think we need to revisit our approach to OData in Breeze. We've been getting away with the pretense that these version changes don't matter. They do ... and more so with each new version and (worse) each new implementation of each version ... many of them partial and conflicting.

My recommendation for now is to keep monkey patching as you're doing now ... and hang in there until we can figure out how to accommodate the OData proliferation.