[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
Michael Pizzo created ODATA-894: ----------------------------------- Summary: 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 (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]