json - Is a batch operation to save a set of navigation properties possible? -


for example: company has employees. posting odata.svc/company(1)/employees/$ref, can save company-employee relation. can save multiple company-employee links way using odata.svc/company(1)/employees/$ref/$batch ? tried didnt work. if incorrect way, there other alternative ?

odata support batching, i'm not sure version of odata using here documentation v3 (v4 same) http://www.odata.org/documentation/odata-version-3-0/batch-processing/

in example batch url, adding $batch end of url using, instead have post odata.svc/$batch request contains details of of operations want perform. example, here 1 of request taken link:

post /service/$batch http/1.1 host: host content-type: multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b

--batch_36522ad7-fc75-4b56-8c71-56071383e77b content-type: multipart/mixed; boundary=changeset_77162fcd-b8da-41ac-a9f8-9357efbbd621 content-length: ###

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbd621 content-type: application/http content-transfer-encoding: binary content-id: 1

post /service/customers http/1.1 host: host content-type: application/atom+xml;type=entry content-length: ###

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbd621 content-type: application/http content-transfer-encoding: binary

post $1/orders http/1.1 host: host content-type: application/atom+xml;type=entry content-length: ###

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbd621-- --batch_36522ad7-fc75-4b56-8c71-56071383e77b--


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -