OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] (ODATA-933) Allow using instance annotations in $filter

    [ https://issues.oasis-open.org/browse/ODATA-933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=64479#comment-64479 ] 

Michael Pizzo commented on ODATA-933:

Note that the distinction between when an annotation is prefixed with a property-name versus nested within a structure is specific to the JSON format.  I would not expect those (rather odd) semantics to be reflected in the (generic) URL stynax.

If we say that the annotation must always be prefixed, that would give us:

 1) Annotation on a primitive property:
     People?$filter=Age@numericValueException eq 'NaN
 2) Annotation on a complex property:
    People?$filter=Address@Model.AddressType eq 'Residential'
 3) Annotation on the resource
     People?$filter=@mymodel.isPending eq true

However, this brings up a bit of an ambiguity with parameter aliases in the last example assuming we omit the namespace prefix for default namespaces (which I think we'll be asked to do).

To address this, I added the following:

Services MAY additionally support the use of the unqualified term name by defining one or more default namespaces through the DefaultNamespace annotation term defined in [OData-VocCore] For more information on default namespaces, see Default Namespaces in [OData-Protocol]. If a query option is specified as a parameter alias whose name matches an unqualified term name, then the value of the parameter alias is used in any expression where the unqualified name is not prefixed with a path.

> Allow using instance annotations in $filter
> -------------------------------------------
>                 Key: ODATA-933
>                 URL: https://issues.oasis-open.org/browse/ODATA-933
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData URL Conventions
>    Affects Versions: V4.0_ERRATA02
>         Environment: New Query Capabilities
>            Reporter: Ralf Handl
>             Fix For: V4.01_WD01
> Instance annotations are rather similar to dynamic properties with a pre-known expressive name, i.e. the client can deduce from the name what type the dynamic property has.
> For example: People?$filter=Age@numericValueException eq 'NaN'
> would retrieve all people for which age is not a number.
> If ODATA-735 gets accepted, clients can know up-front which instance annotations to expect, and can use them in filter conditions.
> Open a separate issue (ODATA-97) to consider use in $select,/$expand.

This message was sent by Atlassian JIRA

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]