trySingleUpdate example


    public function update(string $entity, array $parentIds, Context $context): void
    {
        $definition = $this->registry->getByEntityName($entity);

        if (empty($parentIds)) {
            return;
        }

        RetryableTransaction::retryable($this->connection, function D) use ($definition$parentIds$context): void {
            $this->trySingleUpdate($definition$parentIds$context);
        });
    }

    /** * @param array<string> $parentIds */
    private function trySingleUpdate(EntityDefinition $definition, array $parentIds, Context $context): void
    {
        $entity = $definition->getEntityName();
        $versionAware = $definition->isVersionAware();

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