-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Filter and Sort Restrictions annotations can only be applied to Entity Set or collection properties:
<Term Name="FilterRestrictions" Type="Capabilities.FilterRestrictionsType" Nullable="false" **AppliesTo="EntitySet Collection"**> <Annotation Term="Core.AppliesViaContainer" /> <Annotation Term="Core.Description" String="Restrictions on filter expressions" /> </Term>
Let's take the following use cases:
- Entity Type A has no entity set. It could be only available via one or more containment navigations or as a return type of a function or action. How do I flag that a given property on that entity type is never filterable or sortable ? Do I have to add a NavigationRestrictions annotation for each navigation property of that type ? What about when used as a return type in Functions ?
- Given the following type hierarchy: Entity Type B -> Entity Type C where Entity Type B has no entity set but Entity Type C does. How do I flag non-filterable properties from Entity Type B ?
- Given the following type hierarchy: Entity Type B -> Entity Type C where Entity Type C has no entity set but Entity Type B does. How do I flag non-filterable properties from Entity Type C ?
- Given the following type hierarchy: Entity Type B -> Entity Type C where both Entity Type C and Entity Type B have entity sets. Should non-filterable properties from Entity Type B be mentioned on Entity Set C ?
I have intentionally limited the use cases above to FilterRestrictions, but I have the same questions for SortRestrictions.
It seems to me it should be possible to apply the FilterRestrictions and SortRestrictions annotations for each Entity Type (and even Complex Type) to advertise to clients that some query options are not supported in certain situations. I understand there could be scenarios where specific entity sets have more or less restrictions, which the current model supports.
Any inputs would be greatly appreciated.
Thank you
Metadata
Metadata
Assignees
Labels
Type
Projects
Status