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-894) Support complex property overwriting in derived type

    [ https://issues.oasis-open.org/browse/ODATA-894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61626#comment-61626 ] 

Michael Pizzo commented on ODATA-894:

I would open a separate issue to track constraining facets of primitive types in a derived type. Seems like a much more complicated set of considerations.

> Support complex property overwriting in derived type
> ----------------------------------------------------
>                 Key: ODATA-894
>                 URL: https://issues.oasis-open.org/browse/ODATA-894
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData CSDL, OData JSON CSDL
>    Affects Versions: V4.0_ERRATA02
>         Environment: [Proposed]
>            Reporter: Michael Pizzo
>             Fix For: V4.01_WD01
> Today we allow types to derive from base types and define new properties, but we don't allow overriding existing complex typed properties with derived complex typed properties.
> That means I can define a type FOO with property bar of type BAR:
> <EntityType Name="FOO" IsAbstract="True">
>     <Property Name="bar" Type="ns.BAR"
> </EntityType>
> <ComplexType Name="BAR">
>   <Property Name="property1" Type="Edm.String"/>
> </ComplexType>
> I can define type FOO2 that adds required properties to FOO, and I can define type BAR2 that adds required properties to BAR:
> <EntityType Name="FOO2" BaseType="ns.FOO">
>     <Property Name="requiredOnFOO2" Type="Edn.String" Nullable="false"/>
> </EntityType>
> <ComplexType Name="BAR2" BaseType="ns.BAR">
>   <Property Name="requierdpropertyOnBAR2" Type="Edm.String" Nullable="false"/>
> </ComplexType>
> But I can't add require that instances of FOO2 have the required properties of BAR2 (i.e., that property bar be of type BAR2).
> What we would need to do in order to support this is to allow a property in a derived type to override a complex-typed property of the base type with a complex type that is derived from the type of the property in the base type.
> For example:
> <EntityType Name="FOO2" BaseType="ns.FOO">
>     <Property Name="bar" Type="ns.BAR2" />
> </EntityType>
> The definition of "bar" in FOO2 overrides the definition of "bar" in FOO, meaning that any property "bar" of an instance of FOO2 must be of type BAR2.

This message was sent by Atlassian JIRA

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