OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1232) Support Union types


Michael Pizzo created ODATA-1232:
------------------------------------

             Summary: Support Union types
                 Key: ODATA-1232
                 URL: https://issues.oasis-open.org/browse/ODATA-1232
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: CSDL JSON , CSDL XML
    Affects Versions: V4.01_CS01
         Environment: Proposed
            Reporter: Michael Pizzo
             Fix For: V4.01_CS02


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). 




--
This message was sent by Atlassian JIRA
(v7.7.2#77003)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]