Hello,
yuri espocrm espo-dev, Thank you and your team for all the work done in rolling out v7.2.
Discussion/Request:
Regarding, Espo\Resources\metadata\fields\{fieldType}.json
Can you please provide more information about the definitions skipOrmDefs, valueFactoryClassName and attributeExtractorClassName.
The Field Metadata documentation only states:
skipOrmDefs
true | false
Skip convert in ORM.
skipOrmDefs is sometimes set true, other times false, and in some cases, not defined. (See Examples below).
The Field Metadata documentation also doesn't mention the definitions valueFactoryClassName and attributeExtractorClassName which are settings described in ORM Value Object documentation as of v7.0+.
Similarly, valueFactoryClassName and attributeExtractorClassName are sometimes defined and other times not defined. (See Examples below).
Questions:
Regarding Espo\Resources\metadata\fields\{fieldType}.json
Example 1
Field: address
Scenario: skipOrmDefs: true, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/address.json
Example 2
Field: personName
Scenario: skipOrmDefs: false, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/personName.json
Example 3
Field: currency
Scenario: skipOrmDefs: not defined, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/currency.json
yuri espocrm espo-dev, Thank you and your team for all the work done in rolling out v7.2.
Discussion/Request:
Regarding, Espo\Resources\metadata\fields\{fieldType}.json
Can you please provide more information about the definitions skipOrmDefs, valueFactoryClassName and attributeExtractorClassName.
The Field Metadata documentation only states:
skipOrmDefs
true | false
Skip convert in ORM.
skipOrmDefs is sometimes set true, other times false, and in some cases, not defined. (See Examples below).
The Field Metadata documentation also doesn't mention the definitions valueFactoryClassName and attributeExtractorClassName which are settings described in ORM Value Object documentation as of v7.0+.
Similarly, valueFactoryClassName and attributeExtractorClassName are sometimes defined and other times not defined. (See Examples below).
Questions:
Regarding Espo\Resources\metadata\fields\{fieldType}.json
- For developers wanting to create custom fields, when is it appropriate to set skipOrmDefs: true ?
- If skipOrmDefs is true, what are the implications? Do we also need to create and define custom valueFactoryClassName and attributeExtractorClassName for the field to work correctly ?
- If skipOrmDefs is (not defined), does it default to false ?
- If valueFactoryClassName and attributeExtractorClassName are (not defined), do they default to Espo\ORM\Value\ValueFactory and Espo\ORM\Value\AttributeExtractor respectively?
Example 1
Field: address
Scenario: skipOrmDefs: true, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/address.json
Code:
{ ... "notMergeable": true, "notCreatable": false, "filter": true, "skipOrmDefs": true, "personalData": true, "valueFactoryClassName": "Espo\\Core\\Field\\Address\\AddressFactory", "attributeExtractorClassName": "Espo\\Core\\Field\\Address\\AddressAttributeExtractor" ... }
Field: personName
Scenario: skipOrmDefs: false, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/personName.json
Code:
{ ... "naming": "prefix", "notMergeable": true, "notCreatable": true, "filter": true, "skipOrmDefs": false, "personalData": true, "textFilter": true, "fullTextSearch": true, "validationList": [ "required" ], "fullTextSearchColumnList": [ "first", "last" ] ... }
Field: currency
Scenario: skipOrmDefs: not defined, valueFactoryClassName, attributeExtractorClassName are defined.
Espo/Resources/metadata/fields/currency.json
Code:
{ ... "filter": true, "personalData": true, "valueFactoryClassName": "Espo\\Core\\Field\\Currency\\CurrencyFactory" , "attributeExtractorClassName": "Espo\\Core\\Field\\Currency\\CurrencyAttributeExtractor" ... }
Comment