resetPaths example

if ($operation->getAction() === SyncOperation::ACTION_UPSERT) {
                $parameters = new WriteParameterBag($definition$context, '', $commandQueue);

                $payload = $this->commandExtractor->normalize($definition$operation->getPayload()$parameters);
                $this->gateway->prefetchExistences($parameters);

                $key = $operation->getKey();

                foreach ($payload as $index => $row) {
                    $parameters->setPath('/' . $key . '/' . $index);
                    $context->resetPaths();
                    $this->commandExtractor->extract($row$parameters);
                }

                $writes[] = $this->factory->resolveWrite($definition$payload);
            }
        }

        $context->getExceptions()->tryToThrow();

        $this->gateway->execute($commandQueue->getCommandsInOrder()$context);

        
Home | Imprint | This part of the site doesn't use cookies.