Here is the setup: I have a “Student” that has an associated entity “Course” (from 1 to many). Each "course" has an associated entity "Period", which contains all the details of the time and date of the course. I want to return all students who completed the course in 2011.
I tried this:
~ / Student ()? $ Expand = Course / Period & $ filter = Course / Period / Year eq 2011
but this leads to an error: no property 'Period' exists in type 'System.Data.Objects.DataClasses.EntityCollection`1 [[Course]]
It is clear that Period is being treated as a property, not an Entity, but I'm confused because the following query returns the expected results and uses almost the same syntax:
? ~ / Student () $ = expand course / Period & $ = choose course / Period / year
So am I doing something wrong with the $ filter syntax, or is this not possible?
TIA for any understanding.
source share