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

Annotations targeting contained singletons

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Proposal:
      Hide

      Add a new value depending on the restrictions we want on the single instance

      1. Single Singleton or single-valued Property or Navigation Property
      2. Object Singleton or single-valued complex Property or Navigation Property
      3. Entity Singleton or single-valued Navigation Property

      We can argue that this is a compatible change as the specification calls out that

      clients SHOULD be prepared for any term to be applied to any model element and SHOULD be prepared to handle unknown values within the AppliesTo attribute

      TC agrees to extend AppliesTo="Singleton" to mean also single-valued Property or Navigation Property.

      Show
      Add a new value depending on the restrictions we want on the single instance Single Singleton or single-valued Property or Navigation Property Object Singleton or single-valued complex Property or Navigation Property Entity Singleton or single-valued Navigation Property We can argue that this is a compatible change as the specification calls out that clients SHOULD be prepared for any term to be applied to any model element and SHOULD be prepared to handle unknown values within the AppliesTo attribute TC agrees to extend AppliesTo="Singleton" to mean also single-valued Property or Navigation Property.
    • Resolution:
      Show
      OData-CSDL-JSON  and  OData-CSDL-XML https://github.com/oasis-tcs/odata-specs/pull/63

      Description

      The combination AppliesTo="EntitySet Collection" occurs very often and the EntitySet could even be omitted, because an entity set is also a collection. This combination allows targeting contained entity sets with Target="ns.Schema/EntitySet/collectionValuedNavProp".

      However, AppliesTo="Singleton" does not allow Target="ns.Schema/EntitySet/singleValuedNavProp". In order to treat "contained singletons" like named singletons, a new value for applicability is needed:

      14.1.2 Applicability

      Symbolic Value Model Element
      Instance Singleton or complex-valued Property or Navigation Property

        Attachments

          Activity

            People

            • Assignee:
              heiko.theissen Heiko Theissen
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: