Error with m:type in Example 31 of Atom

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • V4.0_CSD03
    • Affects Version/s: V4.0_CS01
    • Component/s: ATOM Format
    • None
    • Environment:

      [Applied]

    • Hide

      make the type of the collection in the metadata:context attribute Collection(Model.BaseAddress) and remove the m:type element from the <value> element, as in:

      <metadata:value xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata"
      metadata:context="http://host/service/$metadata#Collection(Model.BaseAddress)"
      xmlns="http://docs.oasis-open.org/odata/ns/data"
      >
      <metadata:element>
      <Street>Obere Str. 57</Street>
      <City>Berlin</City>
      <PostalCode>D-12209</PostalCode>
      </metadata:element>
      <metadata:element metadata:type="#Model.Address">
      <Street>12345 Grant Street</Street>
      <City>Taft</City>
      <Region>Ohio</Region>
      <PostalCode>OH 98052</PostalCode>
      </metadata:element>
      </metadata:value>

      Accepted: https://www.oasis-open.org/committees/download.php/50677/odata-meeting-51_on-20130912-minutes.html#odata-498

      Part 1, example 67, line 2, should be:

      "odata.type":"#Northwind.Manager",

      Show
      make the type of the collection in the metadata:context attribute Collection(Model.BaseAddress) and remove the m:type element from the <value> element, as in: <metadata:value xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata" metadata:context="http://host/service/$metadata#Collection(Model.BaseAddress)" xmlns="http://docs.oasis-open.org/odata/ns/data" > <metadata:element> <Street>Obere Str. 57</Street> <City>Berlin</City> <PostalCode>D-12209</PostalCode> </metadata:element> <metadata:element metadata:type="#Model.Address"> <Street>12345 Grant Street</Street> <City>Taft</City> <Region>Ohio</Region> <PostalCode>OH 98052</PostalCode> </metadata:element> </metadata:value> Accepted: https://www.oasis-open.org/committees/download.php/50677/odata-meeting-51_on-20130912-minutes.html#odata-498 Part 1, example 67, line 2, should be: "odata.type":"#Northwind.Manager",
    • Show
      https://www.oasis-open.org/committees/download.php/50765/odata-atom-format-v4.0-wd04-2013-09-20.docx Applied: https://www.oasis-open.org/committees/download.php/50877/odata-meeting-54_on-20131001-minutes.html#ga_01

      Example 31 of atom shows the encoding for a collection of addresses. The metadata:context attribute of the <edm:value> element shows the collection to be of type Collection(Model.Address), but erroneously has an m:type attribute of "#Model.BaseAddress". The first metadata:element has no m:type attribute (which is fine, if it is the base type of the collection type) and the second element explicitly says the type is Model.Address.

      Same problem in Part 1, example 67, with a JSON payload

            Assignee:
            Unassigned
            Reporter:
            Michael Pizzo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: