Skip to content

EspoCRM – Open Source CRM Application

ref

Yuri Kuznetsovcf3cc2c4a527
diff --git a/application/Espo/Core/Utils/Database/Orm/Converter.php b/application/Espo/Core/Utils/Database/Orm/Converter.php
index 31b688bb57..3b74644e2c 100644
--- a/application/Espo/Core/Utils/Database/Orm/Converter.php
+++ b/application/Espo/Core/Utils/Database/Orm/Converter.php
@@ -95,7 +95,7 @@ class Converter
'where' => 'where',
'storeArrayValues' => 'storeArrayValues',
'binary' => 'binary',
- 'dependeeAttributeList' => 'dependeeAttributeList',
+ FieldParam::DEPENDEE_ATTRIBUTE_LIST => AttributeParam::DEPENDEE_ATTRIBUTE_LIST,
FieldParam::PRECISION => AttributeParam::PRECISION,
FieldParam::SCALE => AttributeParam::SCALE,
];
diff --git a/application/Espo/Core/Utils/Database/Orm/FieldConverters/PersonName.php b/application/Espo/Core/Utils/Database/Orm/FieldConverters/PersonName.php
index 10f50a1fd1..93c4fc42e7 100644
--- a/application/Espo/Core/Utils/Database/Orm/FieldConverters/PersonName.php
+++ b/application/Espo/Core/Utils/Database/Orm/FieldConverters/PersonName.php
@@ -34,6 +34,8 @@ use Espo\Core\Utils\Database\Orm\Defs\AttributeDefs;
use Espo\Core\Utils\Database\Orm\Defs\EntityDefs;
use Espo\Core\Utils\Database\Orm\FieldConverter;
use Espo\ORM\Defs\FieldDefs;
+use Espo\ORM\Defs\Params\AttributeParam;
+use Espo\ORM\Defs\Params\FieldParam;
use Espo\ORM\Type\AttributeType;
/**
@@ -151,10 +153,10 @@ class PersonName implements FieldConverter
],
]);
- $dependeeAttributeList = $fieldDefs->getParam('dependeeAttributeList');
+ $dependeeAttributeList = $fieldDefs->getParam(FieldParam::DEPENDEE_ATTRIBUTE_LIST);
if ($dependeeAttributeList) {
- $attributeDefs = $attributeDefs->withParam('dependeeAttributeList', $dependeeAttributeList);
+ $attributeDefs = $attributeDefs->withParam(AttributeParam::DEPENDEE_ATTRIBUTE_LIST, $dependeeAttributeList);
}
return EntityDefs::create()
diff --git a/application/Espo/ORM/Defs/Params/AttributeParam.php b/application/Espo/ORM/Defs/Params/AttributeParam.php
index 3608a4d744..dbc9cd45de 100644
--- a/application/Espo/ORM/Defs/Params/AttributeParam.php
+++ b/application/Espo/ORM/Defs/Params/AttributeParam.php
@@ -88,4 +88,9 @@ class AttributeParam
* Scale.
*/
public const SCALE = 'scale';
+
+ /**
+ * Dependee attributes.
+ */
+ public const DEPENDEE_ATTRIBUTE_LIST = 'dependeeAttributeList';
}
diff --git a/application/Espo/ORM/Defs/Params/FieldParam.php b/application/Espo/ORM/Defs/Params/FieldParam.php
index 17cda72741..ae71555236 100644
--- a/application/Espo/ORM/Defs/Params/FieldParam.php
+++ b/application/Espo/ORM/Defs/Params/FieldParam.php
@@ -88,4 +88,9 @@ class FieldParam
* Scale.
*/
public const SCALE = 'scale';
+
+ /**
+ * Dependee attributes.
+ */
+ public const DEPENDEE_ATTRIBUTE_LIST = 'dependeeAttributeList';
}
diff --git a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php
index a2bea7eab6..853db49cf2 100644
--- a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php
+++ b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php
@@ -1958,7 +1958,7 @@ abstract class BaseQueryComposer implements QueryComposer
foreach ($itemListFiltered as $item) {
$additionalList = array_merge(
$additionalList,
- $this->getAttributeParam($entity, $item, 'dependeeAttributeList') ?? []
+ $this->getAttributeParam($entity, $item, AttributeParam::DEPENDEE_ATTRIBUTE_LIST) ?? []
);
}