mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
⚡ 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user