From 9d2a8d0a67cda00a74ff13a4fe71f4fa437b4ae3 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 23 Jun 2011 12:32:15 +0000 Subject: [PATCH] Fixed regression with the display of lists based on class that is not a leaf (aka standalone) class SVN:trunk[1299] --- core/dbobjectset.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/dbobjectset.class.php b/core/dbobjectset.class.php index bb368bb9c..88cc8a913 100644 --- a/core/dbobjectset.class.php +++ b/core/dbobjectset.class.php @@ -107,7 +107,14 @@ class DBObjectSet // Add the friendly name anytime $oFriendlyNameAttDef = MetaModel::GetAttributeDef($sClass, 'friendlyname'); $aAttToLoadWithAttDef[$sClassAlias]['friendlyname'] = $oFriendlyNameAttDef; + + // Make sure that the final class is requested anytime, whatever the specification (needed for object construction!) + if (!MetaModel::IsStandaloneClass($sClass) && !array_key_exists('finalclass', $aAttList)) + { + $aAttToLoadWithAttDef[$sClassAlias]['finalclass'] = MetaModel::GetAttributeDef($sClass, 'finalclass'); + } } + $this->m_aAttToLoad = $aAttToLoadWithAttDef; } }