Skip to content

Commit

Permalink
TC 2024-10-16
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Oct 16, 2024
1 parent e444e69 commit 941670d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -2410,7 +2410,7 @@ <h4 id="11431-update-related-entities-when-updating-an-entity"><a id="UpdateRela
</summary>
<p>Update requests with an OData-Version header with a value of <code>4.0</code> MUST NOT contain related entities as inline content. Such requests MAY contain binding information for navigation properties. For single-valued navigation properties this replaces the relationship. For collection-valued navigation properties this adds to the relationship.</p>
<p>Payloads with an <code>OData-Version</code> header with a value of <code>4.01</code> or greater MAY include nested entities and entity references that specify the full set of to be related entities, or a nested <a href="#DeltaPayloads">delta payload</a> 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 expanded navigation property, then the set of nested entities and entity references specified in a successful update request represents the full set of entities to be related according to that relationship and MUST NOT include added links, deleted links, or deleted entities.</p>
<p>If a navigation property is absent from a <code>PUT</code> or <code>PATCH</code> request payload, the referenced or contained entity, or the collection thereof, remain unchanged by a successful update.</p>
<p>If a navigation property is absent from a <code>PUT</code> or <code>PATCH</code> request payload, the referenced or contained entity, or the collection thereof, remains unchanged by a successful update.</p>
<div class="example">
<p>Example 78: using the JSON format, a 4.01 <code>PATCH</code> request can update a manager entity. Following the update, the manager has three direct reports; two existing employees and one new employee named <code>Suzanne Brown</code>. The <code>LastName</code> of employee 6 is updated to <code>Smith</code>.</p>
<div class="sourceCode" id="cb97"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb97-1"><a href="#cb97-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
Expand Down Expand Up @@ -2506,7 +2506,7 @@ <h4 id="11431-update-related-entities-when-updating-an-entity"><a id="UpdateRela
<span id="cb100-11"><a href="#cb100-11" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
</div>
<p>If <code>Products</code> was a containment navigation property, the request and response would be the same, except for the entity-id: <code>"@id": "Categories(6)/Products(57)"</code>.</p>
<p>If <code>Products</code> was a containment navigation property, the request and response would be the same, except that the <code>@id</code> would likely be relative to the category, for example, <code>Categories(6)/Products(57)</code>.</p>
<p>If the targeted entity in the payload contains some structural properties, <code>PUT</code> resets all its other structural properties. The following alternative payload resets the product name. The effect would be the same if the <code>@id</code> was omitted from the request.</p>
<div class="side-by-side">
<div class="sourceCode" id="cb101"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true" tabindex="-1"></a><span class="er">PUT</span> <span class="er">http://host/service/Categories(6)?$expand=Products</span></span>
Expand Down
5 changes: 3 additions & 2 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -4454,7 +4454,7 @@ set of entities to be related according to that relationship and MUST
NOT include added links, deleted links, or deleted entities.

If a navigation property is absent from a `PUT` or `PATCH` request payload, the referenced
or contained entity, or the collection thereof, remain unchanged by a successful update.
or contained entity, or the collection thereof, remains unchanged by a successful update.

::: example
Example 78: using the JSON format, a 4.01 `PATCH` request can update a
Expand Down Expand Up @@ -4600,7 +4600,8 @@ Response
::::

If `Products` was a containment navigation property, the request and response
would be the same, except for the entity-id: `"@id": "Categories(6)/Products(57)"`.
would be the same, except that the `@id` would likely be relative to the category,
for example, `Categories(6)/Products(57)`.

If the targeted entity in the payload contains some structural properties,
`PUT` resets all its other structural properties. The following alternative
Expand Down
5 changes: 3 additions & 2 deletions odata-protocol/11.4 Data Modification.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ set of entities to be related according to that relationship and MUST
NOT include added links, deleted links, or deleted entities.

If a navigation property is absent from a `PUT` or `PATCH` request payload, the referenced
or contained entity, or the collection thereof, remain unchanged by a successful update.
or contained entity, or the collection thereof, remains unchanged by a successful update.

::: example
Example ##ex: using the JSON format, a 4.01 `PATCH` request can update a
Expand Down Expand Up @@ -596,7 +596,8 @@ Response
::::

If `Products` was a containment navigation property, the request and response
would be the same, except for the entity-id: `"@id": "Categories(6)/Products(57)"`.
would be the same, except that the `@id` would likely be relative to the category,
for example, `Categories(6)/Products(57)`.

If the targeted entity in the payload contains some structural properties,
`PUT` resets all its other structural properties. The following alternative
Expand Down

0 comments on commit 941670d

Please sign in to comment.