$cascades =
$this->foreignKeyResolver->
getAllReverseInherited($definition,
$resolved,
$writeContext->
getContext());
foreach ($cascades as $affectedDefinitionClass =>
$keys) { $affectedDefinition =
$this->registry->
getByEntityName($affectedDefinitionClass);
foreach ($keys as $key) { if (!\
is_array($key)) { $key =
['id' =>
$key];
} $primary = EntityHydrator::
encodePrimaryKey($affectedDefinition,
$key,
$writeContext->
getContext());
$existence =
new EntityExistence($affectedDefinition->
getEntityName(),
$primary, true, false, false,
[]);
$queue->
add($affectedDefinition,
new UpdateCommand($affectedDefinition,
[],
$primary,
$existence, ''
));
} } } /**
* @param array<mixed> $resolved
*/