formula fetch related link mulitple ids

This commit is contained in:
yuri
2017-09-26 17:50:37 +03:00
parent d9504360d9
commit 8d949fa1fc
2 changed files with 7 additions and 0 deletions
@@ -70,6 +70,11 @@ class AttributeFetcher
if ($parent = $entity->get($relationName)) {
return $parent->get('name');
}
} else if ($entity->getAttributeParam($attribute, 'isLinkMultipleIdList') && $methodName == 'get') {
$relationName = $entity->getAttributeParam($attribute, 'relation');
if (!$entity->has($attribute)) {
$entity->loadLinkMultipleField($relationName);
}
}
return $entity->$methodName($attribute);
@@ -39,6 +39,8 @@ class LinkMultiple extends Base
$fieldName.'Ids' => array(
'type' => 'varchar',
'notStorable' => true,
'isLinkMultipleIdList' => true,
'relation' => $fieldName
),
$fieldName.'Names' => array(
'type' => 'varchar',