|
@@ 325-330 (lines=6) @@
|
| 322 |
|
if (!$hasUrl && $hasPayload) { |
| 323 |
|
$bulkResult = $this->getWrapper()->createBulkResourceforResourceSet($targSet, $data); |
| 324 |
|
assert(is_array($bulkResult)); |
| 325 |
|
for ($i = 0; $i < $numEntries; $i++) { |
| 326 |
|
$targEntityInstance = $bulkResult[$i]; |
| 327 |
|
$this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName); |
| 328 |
|
$key = $this->generateKeyDescriptor($targType, $targEntityInstance); |
| 329 |
|
$link->expandedResult->entries[$i]->id = $key; |
| 330 |
|
} |
| 331 |
|
} |
| 332 |
|
// update |
| 333 |
|
if ($hasUrl && $hasPayload) { |
|
@@ 335-339 (lines=5) @@
|
| 332 |
|
// update |
| 333 |
|
if ($hasUrl && $hasPayload) { |
| 334 |
|
$bulkResult = $this->getWrapper()->updateBulkResource($targSet, $targObj, $keys, $data); |
| 335 |
|
for ($i = 0; $i < $numEntries; $i++) { |
| 336 |
|
$targEntityInstance = $bulkResult[$i]; |
| 337 |
|
$this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName); |
| 338 |
|
$link->expandedResult->entries[$i]->id = $keys[$i]; |
| 339 |
|
} |
| 340 |
|
} |
| 341 |
|
assert(isset($bulkResult) && is_array($bulkResult)); |
| 342 |
|
|