Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/bulkchange.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ protected function PrepareObject(&$oTargetObj, $aRowData, &$aErrors)
// if (!array_key_exists($sAttCode, $this->m_aAttList)) continue;

$oExtKey = MetaModel::GetAttributeDef(get_class($oTargetObj), $sAttCode);
//remove any loaded value to avoid problems with data already in memory due to previous operations
$oExtKey->RemoveLoaded();

if ($this->IsNullExternalKeySpec($aRowData, $sAttCode)) {
foreach ($aReconKeys as $sReconKeyAttCode => $iCol) {
Expand Down
5 changes: 5 additions & 0 deletions core/valuesetdef.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public function ToObjectSet($aArgs = [], $sContains = '', $iAdditionalValue = nu
return new DBObjectSet($oFilter, $this->m_aOrderBy, $aArgs);
}

public function RemoveLoaded()
{
$this->m_bIsLoaded = false;
}

/**
* @inheritDoc
* @throws CoreException
Expand Down
8 changes: 7 additions & 1 deletion sources/Core/AttributeDefinition/AttributeExternalKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ public function GetValuesDef()

return $oValSetDef;
}

public function RemoveLoaded()
{
$oValSetDef = $this->Get("allowed_values");
if ($oValSetDef) {
$oValSetDef->RemoveLoaded();
}
}
public function GetAllowedValues($aArgs = [], $sContains = '')
{
//throw new Exception("GetAllowedValues on ext key has been deprecated");
Expand Down