@@ -214,6 +214,43 @@ var dataStubs = {
214214 'Accept: application/json\n' +
215215 '\n' +
216216 '--dwa_batch_XXX--' ,
217+ batchUpsertUpsertUpsertWithAlternateKeys :
218+ '--dwa_batch_XXX\n' +
219+ 'Content-Type: multipart/mixed;boundary=changeset_XXX\n' +
220+ '\n' +
221+ '--changeset_XXX\n' +
222+ 'Content-Type: application/http\n' +
223+ 'Content-Transfer-Encoding: binary\n' +
224+ 'Content-ID: 100001\n' +
225+ '\n' +
226+ 'PATCH ' + webApiUrl + 'records(key=\'key1\') HTTP/1.1\n' +
227+ 'Content-Type: application/json\n' +
228+ '\n' +
229+ '{"firstname":"Test","lastname":"Batch!"}\n' +
230+ '\n' +
231+ '--changeset_XXX\n' +
232+ 'Content-Type: application/http\n' +
233+ 'Content-Transfer-Encoding: binary\n' +
234+ 'Content-ID: 100002\n' +
235+ '\n' +
236+ 'PATCH ' + webApiUrl + 'records(key=\'key2\') HTTP/1.1\n' +
237+ 'Content-Type: application/json\n' +
238+ '\n' +
239+ '{"firstname":"Test","lastname":"Batch!"}\n' +
240+ '\n' +
241+ '--changeset_XXX\n' +
242+ 'Content-Type: application/http\n' +
243+ 'Content-Transfer-Encoding: binary\n' +
244+ 'Content-ID: 100003\n' +
245+ '\n' +
246+ 'PATCH ' + webApiUrl + 'records(key=\'key3\') HTTP/1.1\n' +
247+ 'Content-Type: application/json\n' +
248+ '\n' +
249+ '{"firstname":"Test","lastname":"Batch!"}\n' +
250+ '\n' +
251+ '--changeset_XXX--\n' +
252+ '\n' +
253+ '--dwa_batch_XXX--' ,
217254 batchUpdateDelete :
218255 '--dwa_batch_XXX\n' +
219256 'Content-Type: multipart/mixed;boundary=changeset_XXX\n' +
@@ -649,6 +686,48 @@ var responseStubs = {
649686 JSON . stringify ( dataStubs . multiple2 ) + '\r\n' +
650687 '--batchresponse_8b19b76e-c553-4c4c-af9d-b5521bfda1ae--'
651688 } ,
689+ batchUpsertUpsertUpsertWithAlternateKeys : {
690+ status : 200 ,
691+ responseText :
692+ '--batchresponse_8b19b76e-c553-4c4c-af9d-b5521bfda1ae\r\n' +
693+ 'Content-Type: multipart/mixed; boundary=changesetresponse_08f5ebfd-5cee-4b64-bc51-ee16c02d47bd\r\n' +
694+ '\r\n' +
695+ '--changesetresponse_08f5ebfd-5cee-4b64-bc51-ee16c02d47bd\r\n' +
696+ 'Content-Type: application/http\r\n' +
697+ 'Content-Transfer-Encoding: binary\r\n' +
698+ 'Content-ID: 100001' +
699+
700+ 'HTTP/1.1 204 No Content\r\n' +
701+ 'OData-Version: 4.0\r\n' +
702+ 'Location: https://url.com/api/data/v8.2/tests(key=\'key1\')\r\n' +
703+ 'OData-EntityId: https://url.com/api/data/v8.2/tests(key=\'key1\')\r\n' +
704+ '\r\n' +
705+ '\r\n' +
706+ '--changesetresponse_08f5ebfd-5cee-4b64-bc51-ee16c02d47bd\r\n' +
707+ 'Content-Type: application/http\r\n' +
708+ 'Content-Transfer-Encoding: binary\r\n' +
709+ 'Content-ID: 100002' +
710+
711+ 'HTTP/1.1 204 No Content\r\n' +
712+ 'OData-Version: 4.0\r\n' +
713+ 'Location: https://url.com/api/data/v8.2/tests(key=\'key2\')\r\n' +
714+ 'OData-EntityId: https://url.com/api/data/v8.2/tests(key=\'key2\')\r\n' +
715+ '\r\n' +
716+ '\r\n' +
717+ '--changesetresponse_08f5ebfd-5cee-4b64-bc51-ee16c02d47bd\r\n' +
718+ 'Content-Type: application/http\r\n' +
719+ 'Content-Transfer-Encoding: binary\r\n' +
720+ 'Content-ID: 100003' +
721+
722+ 'HTTP/1.1 204 No Content\r\n' +
723+ 'OData-Version: 4.0\r\n' +
724+ 'Location: https://url.com/api/data/v8.2/tests(key=\'key3\')\r\n' +
725+ 'OData-EntityId: https://url.com/api/data/v8.2/tests(key=\'key3\')\r\n' +
726+ '\r\n' +
727+ '\r\n' +
728+ '--changesetresponse_08f5ebfd-5cee-4b64-bc51-ee16c02d47bd--\r\n' +
729+ '--batchresponse_8b19b76e-c553-4c4c-af9d-b5521bfda1ae--'
730+ } ,
652731 batchUpdateDelete : {
653732 status : 200 ,
654733 responseText :
0 commit comments