mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
Do not rely on MetaModel::GetRootClass() to check the data model, use the abstraction of ModelReflection instead to keep the code portable.
SVN:trunk[3797]
This commit is contained in:
@@ -580,13 +580,13 @@ class OqlUnionQuery extends OqlQuery
|
||||
if ($iQuery == 0)
|
||||
{
|
||||
// Establish the reference
|
||||
$sRootClass = MetaModel::GetRootClass($aData['class']);
|
||||
$sRootClass = $oModelReflection->GetRootClass($aData['class']);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MetaModel::GetRootClass($aData['class']) != $sRootClass)
|
||||
if ($oModelReflection->GetRootClass($aData['class']) != $sRootClass)
|
||||
{
|
||||
$aSubclasses = MetaModel::EnumChildClasses($sRootClass, ENUM_CHILD_CLASSES_ALL);
|
||||
$aSubclasses = $oModelReflection->EnumChildClasses($sRootClass, ENUM_CHILD_CLASSES_ALL);
|
||||
throw new OqlNormalizeException('Incompatible classes: could not find a common ancestor', $sSourceQuery, $aData['class_name'], $aSubclasses);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user