There was an error while loading. Please reload this page.
1 parent 95029f7 commit 1fb2247Copy full SHA for 1fb2247
1 file changed
src/Model/Insert/PrepareEntityArray.php
@@ -68,6 +68,14 @@ public function iterateVariables(
68
} elseif ($property instanceof \Spameri\Elastic\Entity\ValueInterface) {
69
$preparedArray[$key] = $property->value();
70
71
+ } elseif ($property instanceof \Spameri\Elastic\Entity\Collection\STIEntityCollection) {
72
+ $preparedArray[$key] = [];
73
+ foreach ($property as $item) {
74
+ $iterateVariables = $this->iterateVariables($item->entityVariables());
75
+ $iterateVariables[self::ENTITY_CLASS] = \get_class($item);
76
+ $preparedArray[$key][] = $iterateVariables;
77
+ }
78
+
79
} elseif ($property instanceof \Spameri\Elastic\Entity\EntityCollectionInterface) {
80
$preparedArray[$key] = [];
81
/** @var \Spameri\Elastic\Entity\EntityInterface $item */
0 commit comments