@@ 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 | } |
|
@@ 350-355 (lines=6) @@ | ||
347 | $tuples = $this->type->getManager()->getClient()->evaluate($query)->getData()[0]; |
|
348 | foreach ($tuples as $tuple) { |
|
349 | $data = $this->type->fromTuple($tuple); |
|
350 | if (isset($data['id']) && array_key_exists($data['id'], $this->keyMap)) { |
|
351 | $entity = $this->entities[$this->keyMap[$data['id']]]; |
|
352 | $entity->update($data); |
|
353 | } else { |
|
354 | $entity = $this->createInstance($data); |
|
355 | } |
|
356 | $result[] = $entity; |
|
357 | } |
|
358 |