RestrictDeleteViolation example


        $parameters = new WriteParameterBag($definition$writeContext, '', $commandQueue);
        $ids = $this->commandExtractor->normalize($definition$ids$parameters);
        $this->gateway->prefetchExistences($parameters);

        $resolved = $this->resolvePrimaryKeys($ids$definition$writeContext);

        if (!$definition instanceof MappingEntityDefinition) {
            $restrictions = $this->foreignKeyResolver->getAffectedDeleteRestrictions($definition$resolved$writeContext->getContext(), true);

            if (!empty($restrictions)) {
                throw new RestrictDeleteViolationException($definition[new RestrictDeleteViolation($restrictions)]);
            }
        }

        $skipped = [];
        foreach ($resolved as $primaryKey) {
            /** @var array<string, string> $mappedBytes */
            $mappedBytes = [];
            /** * @var string $key * @var string $value */
            
Home | Imprint | This part of the site doesn't use cookies.