Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-253

Clients should be prepared to handle unadvertised properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: Protocol, Vocabularies
    • Labels:
      None
    • Environment:

      [Proposed]

      Description

      Clients today may see unadvertised properties if a type is marked as open, but open also implies that the client can store properties not defined as part of the type definition.

      For extensibility, services should be allowed to return properties not advertised in metadata without marking the type as open (and implying that the service is capable of persisting properties arbitrary properties). This would allow, for example, $select to contain an expression, aggregations to return aggregated values, etc.

      We need to define the semantics of these unadvertised properties; i.e., must they be reflected back in a PUT (unless they are annotated as read-only) in order to prevent data loss when roundtripping

      Note that, for a request against an open type, the client would have no way of knowing if the property were a dynamic property (which would require specifying in PUT to avoid overwriting) or a property defined, i.e., in $select (which should not be specified in a PUT - note that the server cannot ignore these added properties in general because, if the type is marked as open, the server has no way to know how to distinguish between the client echoing back a read-only property (such as a projected expression) and the client attempting to persist a new open property.

        Attachments

          Activity

          mikep Michael Pizzo (Inactive) created issue -
          ralfhandl Ralf Handl made changes -
          Field Original Value New Value
          Proposal 1) Define a ReadOnly instance annotation (i.e., as part of our core vocabulary.)
          2) State that clients should be prepared to receive additional properties in an entity/complex type that are not advertised in metadata, even for types not marked as open. Such properties MUST be included in a PUT request in order to avoid data loss, unless they are annotated as read-only in which case they MUST NOT be included.
          1) Define a ReadOnly instance annotation (i.e., as part of our core vocabulary.)
          2) State that clients should be prepared to receive additional properties in an entity/complex type that are not advertised in metadata, even for types not marked as open. Such properties MUST be included in a PUT request in order to avoid data loss, unless they are annotated as read-only in which case they MUST NOT be included.

          Accepted: https://www.oasis-open.org/committees/download.php/48346/odata-meeting-26_on-20130221-minutes.html#odata-253
          Status New [ 10000 ] Open [ 1 ]
          ralfhandl Ralf Handl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          ralfhandl Ralf Handl made changes -
          Component/s Vocabularies [ 10324 ]
          ralfhandl Ralf Handl made changes -
          Assignee Ralf Handl [ ralfhandl ]
          ralfhandl Ralf Handl made changes -
          Status Resolved [ 5 ] Applied [ 10002 ]
          handl Ralf Handl made changes -
          Assignee Ralf Handl [ ralfhandl ] Ralf Handl [ handl ]

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: