Question

In the BreezeJS documentation http://www.breezejs.com/documentation/projection-queries they describe how to perform a projection on Related Property and it works fine on my developing environment.

var query = EntityQuery.from("Orders")
    .where("Freight", FilterQueryOp.GreaterThan, 500)
    .select("Customer.CompanyName")
    .orderBy("Customer.CompanyName");

But if i publish the application when i run the query i get the error:

Only properties specified in $expand can be traversed in $select query options
Was it helpful?

Solution

This is an OData restriction when using the OData provider, ( it does not occur with the standard WebApi provider), but in any event you can get around it by adding

.expand("Customer")

to your query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top