/**
* @param array<mixed> $ids
*
* @return array<mixed>
*/
private function extractDeleteCommands(EntityDefinition
$definition, array
$ids, WriteContext
$writeContext, WriteCommandQueue
$commandQueue): array
{ $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) {