setPropertyMapping example


        $attributeName = preg_replace(
            '#^' . preg_quote($field->getPropertyName(), '#') . '\.("([^"]*)"|([^.]*)).*#',
            '$2$3',
            $accessor
        );
        $attributeField = $this->customFieldService->getCustomField($attributeName)
            ?? new JsonField($attributeName$attributeName);

        $field->setPropertyMapping([$attributeField]);

        return parent::buildAccessor($root$field$context$accessor);
    }
}
return;
        }

        if (empty($attributes)) {
            yield $field->getStorageName() => '{}';

            return;
        }

        // set fields dynamically         $field->setPropertyMapping($this->getFields(array_keys($attributes)));
        $encoded = $this->validateMapping($field$attributes$parameters);

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

        if ($existence->exists()) {
            $this->extractJsonUpdate([$field->getStorageName() => $encoded]$existence$parameters);

            return;
        }

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