0

When I filter a decimal column ('Amount') I get a parsing error:

Unable to parse: Amount eq 45d

My client built api url is:

http://localhost:49800/breeze/BreezeDb/Orders?$filter=Amount%20eq%2045d

The url appears fine, but the Server isnt handling the 'd' suffix - if I remove it the query works fine. Similar query in DocCode works fine.

What could be causing this? Why cant the parser handle an expected suffix?

Edit My js code is:

query = EntityQuery.from('Orders').where('amount', 'eq', 45);

I see the above url using the browser Developer Tools. I'm not putting the d suffix on - breeze.js looks to be doing it very deliberately (DataType.Double called with DataType.makeFloatFmt).

Edit 2 I then noticed my data.inlineCount is not working either. It now returns undefined. So I decided to go back and see if & when these functions worked. So with breeze 1.3.0 both decimals & data.inlineCount worked ok. But 1.3.1 they fail as described above.

Contrary to 1.3.1 release notes I can still see the X-InlineCount property being set to the correct figure, but it is not in the response.

4

1 回答 1

1

After much work (debugging Breeze.WebApi 1.3.0 vs 1.3.1) I found this to be caused by the legacy ODataActionFilter not handling the new client Breeze.js code.

The only reason I was using the legacy is that I missed the 0.78.3 release (20/Dec/2012) notes about changing my BreezeController class atttibutes from [JsonFormatter, ODataActionFilter] to [BreezeController].

Changed my BreezeController class atttibutes to [BreezeController] and it all works!

于 2013-07-01T05:12:45.287 回答