瀏覽代碼

Bug fix in HierarchicalKey: host class can be different from target class in case of derived classes.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1494 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 年之前
父節點
當前提交
4581353c9b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      core/attributedef.class.inc.php

+ 2 - 2
core/attributedef.class.inc.php

@@ -2650,7 +2650,7 @@ class AttributeHierarchicalKey extends AttributeExternalKey
 			if ($iRootId > 0) // ignore objects that do no exist in the database...
 			{
 				$oValSetDef = $this->GetValuesDef();
-				$sClass = $this->GetHostClass(); // host class  == target class for HK
+				$sClass = $this->m_sTargetClass;
 				$oFilter = DBObjectSearch::FromOQL("SELECT $sClass AS node JOIN $sClass AS root ON node.".$this->GetCode()." NOT BELOW root.id WHERE root.id = $iRootId");
 				$oValSetDef->AddCondition($oFilter);
 			}
@@ -2672,7 +2672,7 @@ class AttributeHierarchicalKey extends AttributeExternalKey
 			if ($iRootId > 0) // ignore objects that do no exist in the database...
 			{
 				$aValuesSetDef = $this->GetValuesDef();
-				$sClass = $this->GetHostClass(); // host class  == target class for HK
+				$sClass = $this->m_sTargetClass;
 				$oFilter = DBObjectSearch::FromOQL("SELECT $sClass AS node JOIN $sClass AS root ON node.".$this->GetCode()." NOT BELOW root.id WHERE root.id = $iRootId");
 				$oValSetDef->AddCondition($oFilter);
 			}