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

Describe behavior when accessing related entities

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Add subsection "Requesting Related Entities" to section 10.2 describing the behavior when following navigation properties:

      • following a to-many relationship will always result in a feed document. The feed is empty if no entities are actually related
      • following a to-one relationship will always result in an entity document
      • following a to-zero-or-one relationship will result in an entity document if something is related, and a 204 No Content response if nothing is related

      Extend subsection 10.2.4 Requesting $links between Entities:
      If the navigation property has cardinality zero-or-one and no entity is associated, the service SHOULD return 404 Not Found.

      For the case of a zero-to-one relation that currently points to nothing, explain the subtle difference between accessing the related entity itself (e.g. Employees(123)/Manager) and accessing the link to the related entity (e.g. Employees(123)/$links/Manager:

      • in the first case the related manager resource exists logically and is empty, thus 204 No Content.
      • in the second case no link exists between Employees(123) and any Manager, thus 404 Not Found.

      Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47355/latest/odata_meeting-14_on-20121101-minutes.html

      Show
      Add subsection "Requesting Related Entities" to section 10.2 describing the behavior when following navigation properties: following a to-many relationship will always result in a feed document. The feed is empty if no entities are actually related following a to-one relationship will always result in an entity document following a to-zero-or-one relationship will result in an entity document if something is related, and a 204 No Content response if nothing is related Extend subsection 10.2.4 Requesting $links between Entities: If the navigation property has cardinality zero-or-one and no entity is associated, the service SHOULD return 404 Not Found. For the case of a zero-to-one relation that currently points to nothing, explain the subtle difference between accessing the related entity itself (e.g. Employees(123)/Manager) and accessing the link to the related entity (e.g. Employees(123)/$links/Manager: in the first case the related manager resource exists logically and is empty, thus 204 No Content. in the second case no link exists between Employees(123) and any Manager, thus 404 Not Found. Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47355/latest/odata_meeting-14_on-20121101-minutes.html
    • Resolution:
      Show
      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47501/odata-core-v1.0-wd01-part1-protocol-2012-11-16.doc Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47595/latest/odata-meeting-16_on-20121129-minutes.html

      Attachments

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: