You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
single-valued navigation properties under certain conditions
singletons generally.
How does an upsert differ from an update in these cases? The thinking seems to be "a change from null to non-null is treated like an insert". I suggest to make this explicit:
§1. The introductory sentence says
An upsert occurs when the client sends an update request to a valid URL that identifies a single entity that does not yet exist. In this case the service MUST handle the request as a create entity request or fail the request altogether.
Translated for our case, "does not yet exist" means "is null", and (contrary to section 11.4.2) the "create entity request" does not
create an entity in a collection.
§2. The last two paragraphs explain how the If-(None-)Match header can be used to distinguish between insert and update. Translated for our case "insert" means "change from null to non-null" (or even to null?), and "update" means "change from non-null to any value".
This combination makes no sense for entities in a collection. But for our single-valued case this would translate into "PATCH request allowed only if current value is null". The client could enforce this with If-None-Match: *.
Finally, a typo?
Similarly, services MUST fail an update upsert request
The text was updated successfully, but these errors were encountered:
OData-Protocol, section 11.4.4 allows upserts for nullable
How does an upsert differ from an update in these cases? The thinking seems to be "a change from null to non-null is treated like an insert". I suggest to make this explicit:
§1. The introductory sentence says
Translated for our case, "does not yet exist" means "is null", and (contrary to section 11.4.2) the "create entity request" does not
§2. The last two paragraphs explain how the
If-(None-)Match
header can be used to distinguish between insert and update. Translated for our case "insert" means "change from null to non-null" (or even to null?), and "update" means "change from non-null to any value".§3. Clarify the meaning if
Upsertable = true
andUpdatable = false
in the capabilities annotation:https://github.com/oasis-tcs/odata-vocabularies/blob/229c2cd0aca61fcfb9ca66f437ad144ad227a766/vocabularies/Org.OData.Capabilities.V1.xml#L712-L717
This combination makes no sense for entities in a collection. But for our single-valued case this would translate into "PATCH request allowed only if current value is null". The client could enforce this with
If-None-Match: *
.Finally, a typo?
The text was updated successfully, but these errors were encountered: