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] Commented: (ODATA-476) Clarify that type-cast segments are NOT required for properties of derived types in system query options


    [ http://tools.oasis-open.org/issues/browse/ODATA-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34528#action_34528 ] 

Michael Pizzo commented on ODATA-476:
-------------------------------------

A type-cast segment is required for accessing properties of derived types. In the general case, you may have two derived types of the same supertype that happen to define properties with the same name. These are different properties, perhaps even with different types.

For example:

<EntityType Name="Thing">
  <Key><PropertyRef Property="ID"/></Key>
  <Property Name="ID" Type="Edm.Int32" Nullable=false/>
</EntityType>
<EntityType Name="Address" BaseType="Thing">
  <Property Name="Street" Type="Edm.String"/>
  <Property Name="City" Type="Edm.String"/>
  <Property Name="State" Type="Edm.String"/>
  <Property Name="ZipCode" Type="Edm.String"/>
</EntityType>
<EntityType Name="Device" BaseType="Thing">
  <Property Name="Name" Type="Edm.String"/>
  <Property Name="State" Type="Self.DeviceState"/>
</EntityType>
<EnumType Name="DeviceState">
 <Member Name="Enabled"/>
 <Member Name="Disabled"/>
</EnumType>



> Clarify that type-cast segments are NOT required for properties of derived types in system query options
> --------------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-476
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-476
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData URL Conventions 
>    Affects Versions: V4.0_CS
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: V4.0_ERRATA01
>
>
> We allow type-cast segments in expressions, but we don't specify whether they are required.
> As a property name is unique within an instance, the type-cast segment is not necessary for evaluating the expression.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


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