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

Support abstract entity types without key properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      1) Clarify that abstract entities can only derive from other abstract entities
      2) Specify that an entity with abstract=true does not need to define, or derive from a base type that has defined, a key property
      3) Specify that an entity that does not specify abstract=true must define a key, or derive from a base type that has a key defined (directly or indirectly)
      4) Specify that an EntityType with a base type that has a key defined, or is defined with abstract=true, does not need to define any properties

      Note: the key must only be defined once. If a base type defines a key the derived type must not define the key

      Accepted: https://www.oasis-open.org/committees/download.php/48622/odata-meeting-30_on-20130321-minutes.html#odata-303

      Show
      1) Clarify that abstract entities can only derive from other abstract entities 2) Specify that an entity with abstract=true does not need to define, or derive from a base type that has defined, a key property 3) Specify that an entity that does not specify abstract=true must define a key, or derive from a base type that has a key defined (directly or indirectly) 4) Specify that an EntityType with a base type that has a key defined, or is defined with abstract=true, does not need to define any properties Note: the key must only be defined once. If a base type defines a key the derived type must not define the key Accepted: https://www.oasis-open.org/committees/download.php/48622/odata-meeting-30_on-20130321-minutes.html#odata-303
    • Resolution:
      Show
      https://www.oasis-open.org/committees/document.php?document_id=48835&wg_abbrev=odata Accepted: https://www.oasis-open.org/committees/download.php/49026/odata-meeting-34_on-20130425_26-F2F-minutes.html#odata-303

      Description

      Today EntityTypes require key properties, and all entity types within a type hierarchy must have the same key.

      There are cases where it would be very useful to define abstract entity types without a key field, but define that they key fields must be specified before the entity type can be used in an entity set, following the exact same rules as we have defined for the new abstract base Edm.EntityType.

      In particular, this would allow an organization like schema.org to define an ontology in terms of abstract entities and relationships. A service would then have the choice of directly deriving from those types, specifying the keys used by that particular service (and potentially introducing additional properties), or using those types as terms and applying the terms to their model.

      I think this will be critical for organizations like schema.org to adopt odata vocabularies.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: