Skip to content

Deep create - all or nothing #2095

@HeikoTheissen

Description

@HeikoTheissen

According to OData-Protocol, section 11.4.2.2, a deep create request can only create all entities given in the payload or fail altogeher:

On success, the service MUST create all entities and relate them. If the service responds with 201 Created, the response MUST be expanded to include at least the entities and properties that were specified in the deep-insert request.

I consider this an unnecessary restriction on the service. Just like the service is free to change certain structural properties when creating an entity (replace a given quantity with the maximum allowed quantity, say), it should be free to change certain navigation properties (reduce the number of delivery items if things can be delivered together, say).

The only entities that MUST always be created are

  • the top-level entity
  • related entities annotated with Core.ContentID in the payload.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Open

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions