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

Must delta responses continue to track "orphaned" entities?

    XMLWordPrintable

    Details

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

      Applied

    • Proposal:
      Hide

      If a previously tracked related entity is orphaned because all paths to the entity as specified in the defining query have been broken (i.e., due to relationship changes and/or changes or deletions to parent entities) then the service MUST return the appropriate notifications for the client to determine that the entity has been orphaned (i.e., the changed relationships and removed parent entities) but the client should not assume that it will receive additional notifications for such an orphaned entity.

      Show
      If a previously tracked related entity is orphaned because all paths to the entity as specified in the defining query have been broken (i.e., due to relationship changes and/or changes or deletions to parent entities) then the service MUST return the appropriate notifications for the client to determine that the entity has been orphaned (i.e., the changed relationships and removed parent entities) but the client should not assume that it will receive additional notifications for such an orphaned entity.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/57136/odata-v4.0-wd08-part1-protocol-2015-12-15.docx

      Description

      If the defining query for a delta response includes an expand, the expanded entities must also be tracked.

      But, what happens if the expanded entity is deleted or removed from tracking, or if the relationship to a child entity is deleted? Must the delta response continue to track the related entities?

      For example, given Customers with a relationship to Orders, and a query for Customers in Washington that expands Orders. If I:
      -delete a Customer
      -change a Customer's state from Washington
      -remove a relationship from a Customer to an Order
      Do I have to continue tracking changes to the related Order(s)?

      Does the answer depend on whether it's a 1:many relationship (as above) versus a 1:1 (Spouse) or many:many (Orders/Products)?

      Does the answer differ it's a containment relationship (Orders to OrderDetails)?

      Does the answer depend on whether there are other relationships to the same entity?

      It seems that, if the only path to an entity is through an expanded entity that is no longer tracked, or if it's no longer related to that expanded entity, then the service shouldn't have to continue tracking that entity.

      Put another way, if the defining query would no longer return the expanded entity due to reasons other than changes to the expanded entity (i.e., that make it no longer match a filtered expand) or the link from the expanded entity being explicitly removed, then the service should not need to (but may continue to) report changes to the "orphaned" entity.

      If it does stop tracking, should it return a deleted entity with a reason saying that it's no longer in the graph?. I wouldn't think so, but we should be explicit.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: