field level converter

This commit is contained in:
Yuri Kuznetsov
2023-07-13 14:16:37 +03:00
parent 962e48c77a
commit b80fb7c817
2 changed files with 7 additions and 1 deletions
@@ -448,7 +448,9 @@ class Converter
}
/** @var ?class-string<FieldConverter> $className */
$className = $this->metadata->get(['fields', $type, 'converterClassName']);
$className =
$this->metadata->get(['entityDefs', $entityType, 'fields', $field, 'converterClassName']) ??
$this->metadata->get(['fields', $type, 'converterClassName']);
if ($className) {
$toUnset =
+4
View File
@@ -391,6 +391,10 @@
},
"description": "Fields that are incompatible with the subject field on detail view layouts."
},
"converterClassName": {
"type": "string",
"description": "Converts field defs to ORM metadata. Should implement Espo\\Core\\Utils\\Database\\Orm\\FieldConverter."
},
"select": {
"type": "object",
"description": "A custom complex expression to be used for the field when reading from DB. It's possible to define leftJoins and joins that are needed to be applied when the field is being selected.",