c# - Entities inheritance in OData -
i have poc service similar odata.org's demo service
in thier demo have person base type , customer , employee derived types.
i want query (or filtered) instances of derived type employee.
since spec says "an entity can member of @ 1 entity set @ given point in time. entity sets provide entry points data model."
entry point employees through persons entityset, far good.
i'm can't find way filter @odata.type.
i've tried many queries like:
/persons?$filter=@odata.type eq odatademo.employee
/persons?$filter=odata.type eq odatademo.employee
/persons?$filter=type eq odatademo.employee
...
(the root is: http://services.odata.org/v4/odata/(s(eq1ncar1ktn55khwjrukic3c))/odata.svc/persons )
but nothing returned 200 ok status code.
try following uri:
http://services.odata.org/v4/odata/(s(eq1ncar1ktn55khwjrukic3c))/odata.svc/persons/odatademo.employee
the related spec: addressing derived types
Comments
Post a Comment