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

What should service return when attempting to related two entities that are already related?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      OData v4 protocol discusses how to add to the reference collection in a navigation property here:

      11.4.6.1 Add a Reference to a Collection-Valued Navigation Property

      “A successful POST request to a navigation property's references collection adds a relationship to an existing entity. The request body MUST contain a single entity reference that identifies the entity to be added. See the appropriate format document for details.
      On successful completion, the response MUST be 204 No Content and contain an empty body.”

      It does not discuss what should happen if that reference already exists. Should this succeed as a no-op or should the service throw an error saying the record already exists?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: