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

Should be able to change type when PATCHing an entity

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.02
    • Component/s: Protocol
    • Labels:
      None
    • Proposal:
      Hide

      Allow the semantics defined in ODATA-1472 to extend to updating the type of an entity (within the hierarchy of the collection in which it is contained).

      Show
      Allow the semantics defined in ODATA-1472 to extend to updating the type of an entity (within the hierarchy of the collection in which it is contained).

      Description

      In [Protocol](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) we say that Entity id and entity type cannot be changed when updating an entity.

      ODATA-1472 introduces the notion of changing the type of a nested complex type, but stopped short of changing the type of an entity due to concerns that an entities type was part of its identity. 

      However, updating an entity type doesn't necessarily change the identity of the entity; for example, an employee can become a manager and back.

      An entities id is made up of its container plus its key properties. The allowable types that you could change an entity to is already restricted to the hierarchy of the entityset or navigation property in which the entity instance is contained, and the type of that container defines the key property, so there is no concern that changing the type of an entity will change its container nor its key property. Therefore, an entity's identity doesn't change when you change its type.

      Thus, we should allow the semantics defined in ODATA-1472 to extend to updating the type of an entity (within the hierarchy of the collection in which it is contained).

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: