From 871d5eddeb31760f19b46d9d63b03511c43cb85d Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Fri, 1 Aug 2025 11:35:23 +0200 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B02364=20-=20API=20:=20remove=20old=20?= =?UTF-8?q?linkedset=20persistance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ormlinkset.class.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/ormlinkset.class.inc.php b/core/ormlinkset.class.inc.php index 1646270a9e..8980c2a373 100644 --- a/core/ormlinkset.class.inc.php +++ b/core/ormlinkset.class.inc.php @@ -528,7 +528,14 @@ public function UpdateFromCompleteList(iDBObjectSetIterator $oFellow) else { // For backward compatibility reasons, let's rebuild a delta... - + //@since 3.2.2 N°2364 - API : remove old linkedset persistance + /* Goo pattern to use: + * $oCISet = $oTicket->Get(‘functioncis_list’); + * $oCISet->AddItem(MetaModel::NewObject(‘lnkFunctionCIToTicket’, array(‘ci_id’=> 12345)); + * $oCISet->RemoveItem(123456); + * $oTicket->Set(‘functionalcis_list’, $oCISet); + */ + DeprecatedCallsLog::NotifyDeprecatedPhpMethod('old pattern - please get previous value of the linked set, modify it and set it back to the host object'); // Reset the delta $this->iCursor = 0; $this->aAdded = array(); From 209e644d83a6462d780535db0c04815ec20ef5b1 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Tue, 9 Sep 2025 15:38:18 +0200 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B02364=20-=20API=20:=20remove=20old=20?= =?UTF-8?q?linkedset=20persistance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ormlinkset.class.inc.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/ormlinkset.class.inc.php b/core/ormlinkset.class.inc.php index 8980c2a373..e1c80a040f 100644 --- a/core/ormlinkset.class.inc.php +++ b/core/ormlinkset.class.inc.php @@ -513,6 +513,15 @@ public function UpdateFromCompleteList(iDBObjectSetIterator $oFellow) { $bUpdateFromDelta = true; } + } else { + //@since 3.2.2 N°2364 - API : remove old linkedset persistance + /* Goo pattern to use: + * $oCISet = $oTicket->Get(‘functioncis_list’); + * $oCISet->AddItem(MetaModel::NewObject(‘lnkFunctionCIToTicket’, array(‘ci_id’=> 12345)); + * $oCISet->RemoveItem(123456); + * $oTicket->Set(‘functionalcis_list’, $oCISet); + */ + DeprecatedCallsLog::NotifyDeprecatedPhpMethod('old pattern - please get previous value of the linked set, modify it and set it back to the host object'); } if ($bUpdateFromDelta) @@ -528,14 +537,6 @@ public function UpdateFromCompleteList(iDBObjectSetIterator $oFellow) else { // For backward compatibility reasons, let's rebuild a delta... - //@since 3.2.2 N°2364 - API : remove old linkedset persistance - /* Goo pattern to use: - * $oCISet = $oTicket->Get(‘functioncis_list’); - * $oCISet->AddItem(MetaModel::NewObject(‘lnkFunctionCIToTicket’, array(‘ci_id’=> 12345)); - * $oCISet->RemoveItem(123456); - * $oTicket->Set(‘functionalcis_list’, $oCISet); - */ - DeprecatedCallsLog::NotifyDeprecatedPhpMethod('old pattern - please get previous value of the linked set, modify it and set it back to the host object'); // Reset the delta $this->iCursor = 0; $this->aAdded = array();