continue;
} $deleteFlag =
$association->
getFlag(CascadeDelete::
class) ??
$association->
getFlag(RestrictDelete::
class) ??
$association->
getFlag(SetNullOnDelete::
class);
if (!
$deleteFlag instanceof Flag
) { continue;
} if (\
in_array($fk->
onDelete(), self::DELETE_FLAG_TO_ACTION_MAPPING
[$deleteFlag::
class], true
)) { continue;
} $associationViolations[$definition->
getClass()][] =
sprintf( 'ForeignKey "%s" on entity "%s" has wrong OnDelete behaviour, behaviour should be "%s",'
. 'because Association "%s" on entity "%s" defined flag "%s", got "%s" instead.',
$fk->
getName(),
$reference->
getEntityName(),
self::DELETE_FLAG_TO_ACTION_MAPPING
[$deleteFlag::
class][0
],
$association->
getPropertyName(),
$definition->
getEntityName(),