Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-108

Define rules for the target of an annotation that supports implicit casting of relationships

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      When mapping properties of a term the target of the mapping MUST be of the type specified in the term definition or a derived type of the specified type, or annotated with the specified type or a subtype of the specified type.

      Example vocabulary:

      <Schema Namespace="vCard">
      <Term Name="Contact" Type="vCard.ContactType" AppliesTo="EntityType,ComplexType" />
      <ComplexType Name="ContactType">
      <Property Name="PhoneNumbers" Type="Collection(vCard.PhoneNumberType)" />
      ...
      </ComplexType>
      <Term Name="PhoneNumber" Type="vCard.PhoneNumberType" AppliesTo="EntityType,ComplexType" />
      <ComplexType Name="PhoneNumberType">
      <Property Name="Number" Type="String"/>
      ...
      </ComplexType>
      </Schema>

      Example service with annotations:

      <Schema Namespace="SomeService">
      <EntityType Name="Customer">
      ...
      <NavigationProperty Name="Phones" Type="Collection(SomeService.Phone)"/>
      ...
      <Annotation Term="vCard.Contact">
      <Record>
      <PropertyValue Property="PhoneNumbers" Path="Phones/vCard.PhoneNumber#work" />
      </Record>
      </Annotation>
      </EntityType>
      <EntityType Name="Phone">
      ...
      <Property Name="work_phone_number" Type="String"/>
      ...
      <Annotation Term="vCard.PhoneNumber" Qualifier="work">
      <Record>
      <PropertyValue Property="Number" Path="work_phone_number" />
      </Record>
      </Annotation>
      </EntityType>
      </Schema>

      Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-108

      Show
      When mapping properties of a term the target of the mapping MUST be of the type specified in the term definition or a derived type of the specified type, or annotated with the specified type or a subtype of the specified type. Example vocabulary: <Schema Namespace="vCard"> <Term Name="Contact" Type="vCard.ContactType" AppliesTo="EntityType,ComplexType" /> <ComplexType Name="ContactType"> <Property Name="PhoneNumbers" Type="Collection(vCard.PhoneNumberType)" /> ... </ComplexType> <Term Name="PhoneNumber" Type="vCard.PhoneNumberType" AppliesTo="EntityType,ComplexType" /> <ComplexType Name="PhoneNumberType"> <Property Name="Number" Type="String"/> ... </ComplexType> </Schema> Example service with annotations: <Schema Namespace="SomeService"> <EntityType Name="Customer"> ... <NavigationProperty Name="Phones" Type="Collection(SomeService.Phone)"/> ... <Annotation Term="vCard.Contact"> <Record> <PropertyValue Property="PhoneNumbers" Path="Phones/vCard.PhoneNumber#work" /> </Record> </Annotation> </EntityType> <EntityType Name="Phone"> ... <Property Name="work_phone_number" Type="String"/> ... <Annotation Term="vCard.PhoneNumber" Qualifier="work"> <Record> <PropertyValue Property="Number" Path="work_phone_number" /> </Record> </Annotation> </EntityType> </Schema> Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-108
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/48171/odata-core-v1.0-wd01-part3-csdl-2013-02-07-RH.doc https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/csdl.xsd?rev=175 Accepted: https://www.oasis-open.org/committees/download.php/48269/odata-meeting-25_on-20130214-minutes.html#odata-108

      Description

      Define rules around what the target of a PropertyValue in an Annotation may be. It MUST be the specified type, or contain an Annotation mapping it to the specified type.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: