--
You received this message because you are subscribed to the Google Groups "OData Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to odata-discussi...@googlegroups.com.
To post to this group, send email to odata-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Christopher,
$batch is the only defined way in OData 4.0 to insert multiple entities in one request. Reason: $batch allows you to insert multiple entities into multiple entity sets in one change set.
We are currently discussing a feature similar to your use case in https://issues.oasis-open.org/browse/ODATA-613. Upserting a bunch of entities would then use a payload
{
"value":[
Using the delta response format would also allow deleting entities or changing links between entities, and it would allow to GET a delta from one service and POST that same payload to another service to replicate the changes.
How valuable would this alternative syntax be for your use cases?
Thanks in advance!
--Ralf
To post to this group, send email to odata-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "OData Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to odata-discussi...@googlegroups.com.
To post to this group, send email to odata-d...@googlegroups.com.
POST is used to add a single item to a collection.
You could use a $batch request in order to batch multiple such posts in a single request.
The new OData version 4.01 adds support for bulk updates to a collection using a “delta” payload. This feature would allow you to insert multiple entries by doing a PATCH request to the collection with a payload containing the array of items to insert.
The stack that you are using for your OData service may or may not have support for this new OData 4.01 feature. We have added support for creating and parsing batch payloads to the .NET OData Core libraries, and have a work item to add support to our WebAPI
OData stack.
Hope that helps,
-Mike
--
You received this message because you are subscribed to the Google Groups "OData Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
odata-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/odata-discussion/f89b84a8-a459-4736-9749-80e72b44c029%40googlegroups.com.