fix cascade removal conversion
This commit is contained in:
@@ -59,7 +59,6 @@ class RelationConverter
|
|||||||
RelationParam::ADDITIONAL_COLUMNS,
|
RelationParam::ADDITIONAL_COLUMNS,
|
||||||
'noJoin',
|
'noJoin',
|
||||||
RelationParam::INDEXES,
|
RelationParam::INDEXES,
|
||||||
RelationParam::CASCADE_REMOVAL,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
@@ -119,8 +118,14 @@ class RelationConverter
|
|||||||
$raw = $convertedEntityDefs->toAssoc();
|
$raw = $convertedEntityDefs->toAssoc();
|
||||||
|
|
||||||
if (isset($raw[EntityParam::RELATIONS][$name])) {
|
if (isset($raw[EntityParam::RELATIONS][$name])) {
|
||||||
$this->mergeParams($raw[EntityParam::RELATIONS][$name], $params, $foreignParams ?? [], $linkType);
|
$defs = &$raw[EntityParam::RELATIONS][$name];
|
||||||
$this->correct($raw[EntityParam::RELATIONS][$name]);
|
|
||||||
|
$this->mergeParams($defs, $params, $foreignParams ?? [], $linkType);
|
||||||
|
$this->correct($defs);
|
||||||
|
|
||||||
|
if ($params[RelationParam::CASCADE_REMOVAL] ?? false) {
|
||||||
|
$defs[RelationParam::CASCADE_REMOVAL] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [$entityType => $raw];
|
return [$entityType => $raw];
|
||||||
|
|||||||
Reference in New Issue
Block a user