mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
FIX [duplicate][delete] fix error messages for treating the accompaning_period_work linked to the person that will be deleted
This commit is contained in:
@@ -133,8 +133,14 @@ class PersonMove
|
||||
|
||||
$conditions = [];
|
||||
|
||||
foreach ($mapping['joinColumns'] as $columns) {
|
||||
$conditions[] = sprintf('%s = %d', $columns['name'], $from->getId());
|
||||
if (array_key_exists('joinTable', $mapping)) {
|
||||
foreach ($mapping['joinTable']['joinColumns'] as $columns) {
|
||||
$conditions[] = sprintf('%s = %d', $columns['referencedColumnName'], $from->getId());
|
||||
}
|
||||
} elseif (array_key_exists('joinColumns', $mapping)) {
|
||||
foreach ($mapping['joinColumns'] as $columns) {
|
||||
$conditions[] = sprintf('%s = %d', $columns['name'], $from->getId());
|
||||
}
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
|
Reference in New Issue
Block a user