|
@@ 190-195 (lines=6) @@
|
| 187 |
|
if (!empty($data->getData())) { |
| 188 |
|
foreach ($data->getData() as $tuple) { |
| 189 |
|
$data = $this->type->fromTuple($tuple); |
| 190 |
|
if (isset($data['id']) && array_key_exists($data['id'], $this->keyMap)) { |
| 191 |
|
$entity = $this->entities[$this->keyMap[$data['id']]]; |
| 192 |
|
$entity->update($data); |
| 193 |
|
} else { |
| 194 |
|
$entity = $this->createInstance($data); |
| 195 |
|
} |
| 196 |
|
if ($oneItem) { |
| 197 |
|
return $this->findCache[$findKey] = $entity; |
| 198 |
|
} |
|
@@ 352-357 (lines=6) @@
|
| 349 |
|
$tuples = $this->type->getManager()->getClient()->evaluate($query)->getData()[0]; |
| 350 |
|
foreach ($tuples as $tuple) { |
| 351 |
|
$data = $this->type->fromTuple($tuple); |
| 352 |
|
if (isset($data['id']) && array_key_exists($data['id'], $this->keyMap)) { |
| 353 |
|
$entity = $this->entities[$this->keyMap[$data['id']]]; |
| 354 |
|
$entity->update($data); |
| 355 |
|
} else { |
| 356 |
|
$entity = $this->createInstance($data); |
| 357 |
|
} |
| 358 |
|
$result[] = $entity; |
| 359 |
|
} |
| 360 |
|
|