Question

Bulk update (MERGE) using OData

Is it possible to  perform bulk update by say utilizing both $filter and MERGE?

I need it to change a number of records with the same value but it would be nice to avoid resolving Id for each one.

Direct approach failed with an error

Query options $select, $expand, $filter, $orderby, $inlinecount, $skip, $skiptoken and $top are not supported by this request method or cannot be applied to the requested resource.

You may reproduce my call by substituting appropriate Id, actually it also should update by primary key but doesn't

url -X MERGE -H 'Content-Type: application/json;odata=verbose' -H 'Accept: application/atom+xml' -i 'http://terapp-t.hq.eximb.com/0/ServiceModel/EntityDataService.svc/Accou? eq '\''648dbb58-2aea-578d-e053-2413a8c01794'\' --data '{Name: '\''Other name'\''}'

Was my syntax incorrect or the whole idea?

 

Like 0

Like

1 comments

Hello,

Unfortunately, one http request can contains only one CRUD operation for Odata, unless using batch.

In order to update the record by primary key, please use the following syntax:

'http://terapp-t.hq.eximb.com/0/ServiceModel/EntityDataService.svc/AccountCollection(guid'648dbb58-2aea-578d-e053-2413a8c01794')'







 

Show all comments