Optimize Column load when using api core/get

Getting in SQL only desired columns to show
Used when output_fields != '*' || '*+'

Signed-off-by: Guy Couronné <gcouronne@sapiens.biz>
This commit is contained in:
Guy Couronné
2019-03-15 11:17:58 +01:00
parent 76c3f640db
commit 9b8dace833

View File

@@ -467,6 +467,12 @@ class CoreServices implements iRestServiceProvider
}
else
{
if (!$bExtendedOutput && RestUtils::GetOptionalParam($aParams, 'output_fields', '*') != '*')
{
$aAttToLoad = array($oObjectSet->GetClassAlias() => $aShowFields[$sClass]);
$oObjectSet->OptimizeColumnLoad($aAttToLoad);
}
while ($oObject = $oObjectSet->Fetch())
{
$oResult->AddObject(0, '', $oObject, $aShowFields, $bExtendedOutput);