OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1239) Define a mechanism to distinguish between inserted and updated entities in a Delta Response


Mark Biamonte created ODATA-1239:
------------------------------------

             Summary: Define a mechanism to distinguish between inserted and updated entities in a Delta Response
                 Key: ODATA-1239
                 URL: https://issues.oasis-open.org/browse/ODATA-1239
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Improvement
          Components: JSON Format, Protocol
    Affects Versions: V4.01_CS02
            Reporter: Mark Biamonte


In a delta response, Added and Changed entities are represented as Entities in the delta response. There is no way for the client to distinguish between an Inserted entity and a Changed entity. If the client is using the delta response to keep data in a cache or data warehouse in sync, then the distinction between an Inserted and Updated entity doesn't really matter. The client would do an upsert of the Inserted / Updated entity. If the entity exists it gets updated and if it doesn't it gets inserted.

However, in cases where the changes are being tracked for auditing or reporting purposes, it is useful to be able to distinguish between an inserted or updated entity. There is a difference between inserted and updated entities in a delta response in that an inserted entity must include all selected properties where as an updated entity must only include all selected properties that changed. The distinction is not reliable for detecting the difference though. It is possible that all of the selected properties of an existing entity have change and it is also possible that a server would always return all selected properties of an updated entity.

Consider adding an optional @inserted or @updated annotation or both to make the distinction between the Inserted and Updated entities, This is similar to the @removed annotation that already exists.

When a delta payload is provided to the service in the body of an update request, the @inserted or @updated annotations would typically would not be needed, but it should be fine to include them if for example the delta payload was originally received as a delta response.

Â

Â



--
This message was sent by Atlassian JIRA
(v7.7.2#77003)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]