Skip to content

Commit

Permalink
Explain example
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Sep 12, 2024
1 parent 437b7dd commit ef39938
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -2472,7 +2472,8 @@ <h4 id="11431-update-related-entities-when-updating-an-entity"><a id="UpdateRela
<span id="cb98-29"><a href="#cb98-29" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<div class="example">
<p>Example 80: When updating an entity with a 4.01 <code>PUT</code> request, the target of a non-containment navigation property can be replaced without changing either the old or the new targeted entity itself. The targeted entity can then only be specified by an entity reference (see <a href="https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#EntityReference">OData-JSON, section “Entity Reference”</a>):</p>
<p>Example 80: When updating an entity with a 4.01 <code>PUT</code> request, the target of a non-containment navigation property can be replaced without changing either the old or the new targeted entity itself. The targeted entity can then only be specified by an entity reference (see <a href="https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#EntityReference">OData-JSON, section “Entity Reference”</a>).</p>
<p>The following JSON payload changes the last name and the manager of Suzanne Brown:</p>
<div class="sourceCode" id="cb99"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb99-1"><a href="#cb99-1" aria-hidden="true" tabindex="-1"></a><span class="er">PUT</span> <span class="er">http://host/service/Employees(7)</span></span>
<span id="cb99-2"><a href="#cb99-2" aria-hidden="true" tabindex="-1"></a><span class="er">Content-Type:</span> <span class="er">application/json</span></span>
<span id="cb99-3"><a href="#cb99-3" aria-hidden="true" tabindex="-1"></a></span>
Expand Down
4 changes: 3 additions & 1 deletion docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -4555,7 +4555,9 @@ nested delta representation to:
Example 80: When updating an entity with a 4.01 `PUT` request, the target of a
non-containment navigation property can be replaced without changing either the
old or the new targeted entity itself. The targeted entity can then only be
specified by an entity reference (see [OData-JSON, section "Entity Reference"](https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#EntityReference)):
specified by an entity reference (see [OData-JSON, section "Entity Reference"](https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#EntityReference)).

The following JSON payload changes the last name and the manager of Suzanne Brown:
```json
PUT http://host/service/Employees(7)
Content-Type: application/json
Expand Down
4 changes: 3 additions & 1 deletion odata-protocol/11.4 Data Modification.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ nested delta representation to:
Example ##ex: When updating an entity with a 4.01 `PUT` request, the target of a
non-containment navigation property can be replaced without changing either the
old or the new targeted entity itself. The targeted entity can then only be
specified by an entity reference (see [OData-JSON, section "Entity Reference"]($$$OData-JSON$$$#EntityReference)):
specified by an entity reference (see [OData-JSON, section "Entity Reference"]($$$OData-JSON$$$#EntityReference)).

The following JSON payload changes the last name and the manager of Suzanne Brown:
```json
PUT http://host/service/Employees(7)
Content-Type: application/json
Expand Down

0 comments on commit ef39938

Please sign in to comment.