[-] BO: Improve memory usage in admin product in global context with a lot of shops and attributes
This commit is contained in:
@@ -47,7 +47,6 @@ class AttributeCore extends ObjectModel
|
|||||||
'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'),
|
'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'),
|
||||||
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||||||
|
|
||||||
// Lang fields
|
|
||||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
|
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -130,7 +129,7 @@ class AttributeCore extends ObjectModel
|
|||||||
return array();
|
return array();
|
||||||
|
|
||||||
return Db::getInstance()->executeS('
|
return Db::getInstance()->executeS('
|
||||||
SELECT ag.*, agl.*, a.`id_attribute`, al.`name`, agl.`name` AS `attribute_group`
|
SELECT DISTINCT ag.*, agl.*, a.`id_attribute`, al.`name`, agl.`name` AS `attribute_group`
|
||||||
FROM `'._DB_PREFIX_.'attribute_group` ag
|
FROM `'._DB_PREFIX_.'attribute_group` ag
|
||||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||||
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
||||||
|
|||||||
Reference in New Issue
Block a user