tags:

views:

14

answers:

1

Given a structure where two types are exposed in an OData system with a master/detail relationship:

Order
- OrderDetails

How would you filter a query of orders based upon the count of associated OrderDetails? In my head, it's something along the lines of

/Orders$filter=count(OrderDetails) eq 0

But, of course there's no count function. So, how would you produce a list of orders which had no OrderDetails?

A: 

Very similar question to this one: http://stackoverflow.com/questions/3390761/collection-exists-criteria-in-wcf-data-services Currently the OData protocol doesn't support any operator/query to do that. The best solution is to expose a service operation which exposes this kind of operation from the server directly.

Vitek Karas MSFT
You're right, that's pretty darn similar. My search prowess is obviously dulling.
MojoFilter