fix(constructeur) : fix remaining references after ConstructeurLink migration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-31 14:50:05 +02:00
parent 34b0d9225c
commit 5fff226f84
4 changed files with 35 additions and 21 deletions

View File

@@ -837,11 +837,16 @@ final class EntityVersionService
$snapshot['version'] = $entity->getVersion();
}
// Constructeurs
if (method_exists($entity, 'getConstructeurs')) {
$snapshot['constructeurIds'] = [];
foreach ($entity->getConstructeurs() as $c) {
$snapshot['constructeurIds'][] = ['id' => $c->getId(), 'name' => $c->getName()];
// Constructeur links
if (method_exists($entity, 'getConstructeurLinks')) {
$snapshot['constructeurLinks'] = [];
foreach ($entity->getConstructeurLinks() as $link) {
$snapshot['constructeurLinks'][] = [
'id' => $link->getId(),
'constructeurId' => $link->getConstructeur()->getId(),
'constructeurName' => $link->getConstructeur()->getName(),
'supplierReference' => $link->getSupplierReference(),
];
}
}