-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_CS01
-
Fix Version/s: V4.01_CS02
-
Component/s: Protocol
-
Labels:None
-
Environment:
Applied
-
Proposal:
-
Resolution:
Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection.
This question also arises in the context of "deep update" with nested entities for single-valued navigation.
Field | Original Value | New Value |
---|---|---|
Environment | Proposed | |
Status | New [ 10000 ] | Open [ 1 ] |
Proposal |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. |
|
Description |
Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection Clarify that upsert is also valid along a nullable single-valued navigation property, at least as long the key property values are client-defined. May also work with server-defined keys by responding with 201 and a location header with the canonical URL of the newly created entity. |
Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection. |
Environment | Proposed |
Proposal |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. See wording for handling of deep updates: http://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_UpdateRelatedEntitiesWhenUpdatinganE |
Proposal |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. See wording for handling of deep updates: http://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_UpdateRelatedEntitiesWhenUpdatinganE |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. If the client specifies a key value for which no entity exists, the request fails. See wording for handling of deep updates: [http://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_UpdateRelatedEntitiesWhenUpdatinganE] |
Description | Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection. |
Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection.
This question also arises in the context of "deep update" with nested entities for single-valued navigation. |
Proposal |
Clarify that upsert is also valid along a nullable single-valued navigation property.
If the key property values are client-defined, this is straight-forward. If the key values are server-generated, the client can specify a key value, in which case the identified target is related and updated with provided non-key property values. And the client can omit the key properties, in which case a new entity is created from the provided property values and then related. If the client specifies a key value for which no entity exists, the request fails. See wording for handling of deep updates: [http://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_UpdateRelatedEntitiesWhenUpdatinganE] |
PUT or PATCH to a single-valued navigation property *reference* (i.e., customers/salesperson/$ref) MUST only include the entity id, and changes which entity is referenced by the navigation property.
PUT or PATCH to a single-valued navigation property (i.e., customers/salesperson) performs an update on the currently related resource. If the value of the navigation property is non-null then any key values are ignored and the referenced entity is updated. If the value of the navigation property is null, for a containment relationship a resource is created (since the single-valued navigation path identifies the resource). For a non-containment relationship, PUT or PATCH to a null single-valued navigation property returns an error. The same semantics apply to singletons on the entity container, which are semantically contained single value navigation properties. |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Environment | Proposed | Applied |
Resolution |
[https://www.oasis-open.org/committees/download.php/64119/odata-v4.01-wd06-part1-protocol-2018-10-19.docx]
|
|
Status | Resolved [ 5 ] | Applied [ 10002 ] |
Status | Applied [ 10002 ] | Closed [ 6 ] |