protected function ResolveExternalKey($aRowData, $sAttCode, &$aResults) { $oExtKey = MetaModel::GetAttributeDef($this->m_sClass, $sAttCode); $oReconFilter = new DBObjectSearch($oExtKey->GetTargetClass()); foreach ($this->m_aExtKeys[$sAttCode] as $sForeignAttCode => $iCol) { if ($sForeignAttCode == 'id') { $value = (int) $aRowData[$iCol]; } else { // The foreign attribute is one of our reconciliation key $oForeignAtt = MetaModel::GetAttributeDef($oExtKey->GetTargetClass(), $sForeignAttCode); $value = $oForeignAtt->MakeValueFromString($aRowData[$iCol], $this->m_bLocalizedValues); } $oReconFilter->AddCondition($sForeignAttCode, $value, '='); $aResults[$iCol] = new CellStatus_Void($aRowData[$iCol]); } $oExtObjects = new CMDBObjectSet($oReconFilter); $aKeys = $oExtObjects->ToArray(); return array($oReconFilter->ToOql(), $aKeys); }