Question

I get this error: "Unknown expression type to handle: EntitySetExpression" when trying to filter or order on an Odata navigation property.

    App.store.Person.include('Friend')
    .filter("it.age >= 10 && it.Friend.age >=10").toArray();

I get the same error if I include a navigation property in an order function:

App.store.Person.include('Friend').orderBy("it.Friend.age").toArray();

any idea as to why this shouldnt work? thanks

EDIT: My Question was a bit misleading! what I tried to to was filtering the navigation property itself in the same query. I was also wrong to think that JayData would return navigation properties as Queryable objects.

Was it helpful?

Solution

I guess that Person and Friend is a 1-N relation so for the filter you'll need the some() or every() operation, see this: Using JayData to filter Header Detail Table - Inner Join SQL, oData

For the orderby() I'm still looking

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