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

Allow Type of Singleton to be a Primitive, EnumType, or ComplexType

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V5.0_WD01
    • Component/s: CSDL JSON , CSDL XML
    • Labels:
      None
    • Environment:

      Specification of service level attributes.

    • Proposal:
      Hide

      Proposed change to 13.3 Singleton of CSDL specs
      From:
      A singleton MUST specify a type that MUST be an entity type in scope.
      To:
      A singleton MUST specify a type that MUST be an entity type , primitive type, complex type, or enumeration type in scope.

      Show
      Proposed change to 13.3 Singleton of CSDL specs From: A singleton MUST specify a type that MUST be an entity type in scope. To: A singleton MUST specify a type that MUST be an entity type   , primitive type, complex type, or enumeration type   in scope.

      Description

      In the context of an EntityContainer, it is more difficult than necessary to include a service level property or set of properties.  

      For example, if we want to expose the service name as a simple string property in the entity container (i.e. as a Singleton).

      We could add this to a Details entity type without a key, and then reference this via a Singleton.  Then GET get <service>/details/name. It would be more natural to simply GET <service>/name.   In another example, suppose we want to reuse this structure within other entity types.  If Details is specified as a complex type, then the natural thing is to define a scalar property detail with type Details.  However, if Details is an entity type, we instead use a scalar navigation property with attribute ContainsTarget=true and annotate with Core.AutoExpand to get the same behavior.

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              george.ericson George Ericson
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: