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

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor
    • V5.0
    • Affects Version/s: V4.01_OS
    • Component/s: CSDL JSON, CSDL XML
    • None
    • 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.

      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.

       

       

       

            Assignee:
            Unassigned
            Reporter:
            george.ericson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: