1
votes

We have a need to select records based on the value of a related child table's properties. I discovered today that this feature is supported in odata with a keyword called 'any'. Further it's supported in the default breeze server implemention (using entity framework). Using the same server that my breeze client does, I can enter an odata query in a browser using the 'any' keyword and select records on a related child's field value. For example:

.../Issue?$filter=oIssueImages/any(ii: ii/IssueImageRef eq 4)

And it works! But, there is no support for this in the breezejs client code.

FWIW: I found this breeze feature request: https://breezejs.uservoice.com/forums/173093-breeze-feature-suggestions/suggestions/3988038-adding-any-and-all-filter-operators

Anyone know when breeze will implement this feature?

1

1 Answers

4
votes

Updated post: 11/25/13

As of Breeze 1.4.6, 'any' and 'all' operators are now supported.

So your client side Breeze query would look something like:

var query = EntityQuery.from("Issue")
  .where("oIssueImages", "any", "IssueImageRef", "==", 4);
myEntityManager.executeQuery(query).then(...)

Also see: http://www.breezejs.com/documentation/query-examples

Older post

Please vote it up. This is a really good feature, but we really do try to accommodate those features that get the most votes.