From 043ef9a7d0b4c95d00238736efdeae68d40edd96 Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Tue, 21 Apr 2026 10:51:38 +0200 Subject: [PATCH] Fix(Injection): Preserve entities_id if needed --- CHANGELOG.md | 1 + inc/commoninjectionlib.class.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4370626e..e4d3dc88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix crash when injection model has no mandatory fields defined - Fix models created on parent entities can't be used on child entites +- Preserve `entities_id` ## [2.15.4] - 2026-03-16 diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 8980b4c1..4556627f 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -1706,6 +1706,10 @@ private function effectiveAddOrUpdate($injectionClass, $item, $values, $add = tr if (!$add && $key === 'id') { $toinject[$key] = $value; } + + if ($key === 'entities_id') { + $toinject[$key] = $value; + } } $newID = null;