Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: Vocabularies
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      DerivedTypeConstraint already exists, just need to extend its use and clarify:

      Proposal:

      1) Add "EntitySet, Singleton, NavigationProperty, Function, Action, and Parameter to AppliesTo.

      2) Clarify in the description that types derived from allowed types are also allowed

      Show
      DerivedTypeConstraint already exists, just need to extend its use and clarify: Proposal: 1) Add "EntitySet, Singleton, NavigationProperty, Function, Action, and Parameter to AppliesTo. 2) Clarify in the description that types derived from allowed types are also allowed
    • Resolution:
      Hide

      https://github.com/oasis-tcs/odata-vocabularies/pull/27
      See comment below; I think we should replace "Function" and "Action" in AppliesTo with "ReturnType" and clarify behavior when applying to both TypeDefinition and a property/param/return type value of that type.
       

      Show
      https://github.com/oasis-tcs/odata-vocabularies/pull/27 See comment below; I think we should replace "Function" and "Action" in AppliesTo with "ReturnType" and clarify behavior when applying to both TypeDefinition and a property/param/return type value of that type.  

      Description

      Type inheritance implies polymorphism implies that a property may be any of type derived from the declared type. In some cases, a property may be able to be one of a discrete set of types.

      For example, in the Schema.org schemas, many of the references can point to either a person or an organization. Person and Organization may derive from a common type, but other types derived from that common base type are not allowed.

      There are several possible approaches for representing such unions:
      1) Allow defining a discrete set of types for a property, that may or may not have a common base type, rather than a single type.
      2) Define a "union" type structure that is an open complex type with properties for each "type"
      3) Define an annotation that allows you to restrict the set of derived types of a property. The types must derive from the declared type of the property, which could be an abstract type (i.e., Edm.EntityType).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: