getCurrentState example

$this->prefetch($this->definitionInstanceRegistry->getByEntityName($entity)$pks$parameters);
        }

        $primaryKeyBag->setPrefetchingCompleted(true);
    }

    /** * {@inheritdoc} */
    public function getExistence(EntityDefinition $definition, array $primaryKey, array $data, WriteCommandQueue $commandQueue): EntityExistence
    {
        $state = $this->getCurrentState($definition$primaryKey$commandQueue);

        $exists = !empty($state);

        $isChild = $this->isChild($definition$data$state$primaryKey$commandQueue);

        $wasChild = $this->wasChild($definition$state);

        $decodedPrimaryKey = [];
        foreach ($primaryKey as $fieldStorageName => $fieldValue) {
            $field = $definition->getFields()->getByStorageName($fieldStorageName);
            $decodedPrimaryKey[$fieldStorageName] = $field ? $field->getSerializer()->decode($field$fieldValue) : $fieldValue;
        }
Home | Imprint | This part of the site doesn't use cookies.