Skip to content

Update -> upsert #2082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from
Draft

Update -> upsert #2082

wants to merge 37 commits into from

Conversation

HeikoTheissen
Copy link
Contributor

Fixes #2060

Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, only minor remarks

@@ -124,7 +124,7 @@ be processed in an all-or-nothing fashion.
#### ##subsubsubsec Returning Results from Data Modification Requests

Clients can request whether created or modified resources are returned
from [create](#CreateanEntity), [update](#UpdateanEntity), and
from [create](#CreateanEntity), [upsert](#UpsertanEntity), and
[upsert](#UpsertanEntity) operations using the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now upsert appears twice

value obtained from a previous request. If an ETag is provided that does not match the ETag
value of the entity being updated, or if an ETag is provided for an entity that does not
value of the entity being d, or if an ETag is provided for an entity that does not
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"updated" instead of "d"?

ralfhandl
ralfhandl previously approved these changes May 16, 2025
Base automatically changed from 2060/upsert-singleton to main May 21, 2025 15:30
@mikepizzo mikepizzo dismissed ralfhandl’s stale review May 21, 2025 15:30

The base branch was changed.

@HeikoTheissen HeikoTheissen moved this to Open in OData TC May 21, 2025
@@ -476,14 +476,14 @@ greater MAY include nested entities and entity references that specify
the full set of to be related entities, or a nested [delta
payload](#DeltaPayloads) representing the related entities that have
been added, removed, or changed. Such a request is referred to as a
"deep update". If the nested collection is represented identical to an
"deep upsert". If the nested collection is represented identical to an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be better to keep "deep update" to align with vocab, since it also includes deletes.

@@ -701,7 +701,7 @@ through a navigation property path binding [#OData-CSDL#NavigationPropertyPathBi
or through the presence of a context URL within the payload;
if the service is unable to determine it, it MUST fail the request.

Upserts are not supported against entities whose keys' values are
Upsert requests MUST NOT be treated as inserts of entities whose keys' values are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's really can not -- there is no way to specify the url of an entity whose key is generated by the service and does not yet exist. The MUST comes in the following line.

@github-project-automation github-project-automation bot moved this from Open to Review in OData TC Jun 3, 2025
@HeikoTheissen HeikoTheissen moved this from Review to Open in OData TC Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Open
Development

Successfully merging this pull request may close these issues.

Nullable single-valued navigation property or singleton: update or upsert?
3 participants