|
@@ 298-303 (lines=6) @@
|
| 295 |
|
if (!$hasUrl && $hasPayload) { |
| 296 |
|
$bulkResult = $this->getWrapper()->createBulkResourceforResourceSet($targSet, $data); |
| 297 |
|
assert(is_array($bulkResult)); |
| 298 |
|
for ($i = 0; $i < $numEntries; $i++) { |
| 299 |
|
$targEntityInstance = $bulkResult[$i]; |
| 300 |
|
$this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName); |
| 301 |
|
$key = $this->generateKeyDescriptor($targType, $targEntityInstance); |
| 302 |
|
$link->expandedResult->entries[$i]->id = $key; |
| 303 |
|
} |
| 304 |
|
} |
| 305 |
|
// update |
| 306 |
|
if ($hasUrl && $hasPayload) { |
|
@@ 308-312 (lines=5) @@
|
| 305 |
|
// update |
| 306 |
|
if ($hasUrl && $hasPayload) { |
| 307 |
|
$bulkResult = $this->getWrapper()->updateBulkResource($targSet, $targObj, $keys, $data); |
| 308 |
|
for ($i = 0; $i < $numEntries; $i++) { |
| 309 |
|
$targEntityInstance = $bulkResult[$i]; |
| 310 |
|
$this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName); |
| 311 |
|
$link->expandedResult->entries[$i]->id = $keys[$i]; |
| 312 |
|
} |
| 313 |
|
} |
| 314 |
|
assert(isset($bulkResult) && is_array($bulkResult)); |
| 315 |
|
|