mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
optimistic concurrency control: skip
This commit is contained in:
@@ -33,6 +33,7 @@ use Espo\Core\Name\Field;
|
||||
use Espo\Core\Record\ConcurrencyControl\Optimistic\Result;
|
||||
use Espo\Core\Utils\FieldUtil;
|
||||
use Espo\ORM\BaseEntity;
|
||||
use Espo\ORM\Defs\Params\FieldParam;
|
||||
use Espo\ORM\Entity;
|
||||
use Espo\ORM\EntityManager;
|
||||
|
||||
@@ -64,7 +65,16 @@ class OptimisticProcessor
|
||||
->getDefs()
|
||||
->getEntity($entity->getEntityType());
|
||||
|
||||
foreach ($entityDefs->getFieldNameList() as $field) {
|
||||
foreach ($entityDefs->getFieldList() as $fieldDefs) {
|
||||
$field = $fieldDefs->getName();
|
||||
|
||||
if (
|
||||
$fieldDefs->getParam('optimisticConcurrencyControlIgnore') ||
|
||||
$fieldDefs->getParam(FieldParam::READ_ONLY)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($this->fieldUtil->getActualAttributeList($entityDefs->getName(), $field) as $attribute) {
|
||||
if (
|
||||
$entity instanceof BaseEntity &&
|
||||
|
||||
@@ -68,4 +68,9 @@ class FieldParam
|
||||
* A default value.
|
||||
*/
|
||||
public const DEFAULT = 'default';
|
||||
|
||||
/**
|
||||
* Read-only.
|
||||
*/
|
||||
public const READ_ONLY = 'readOnly';
|
||||
}
|
||||
|
||||
@@ -1033,6 +1033,10 @@
|
||||
"type": "string",
|
||||
"description": "Duplicates attributes of a field. Some fields can require some processing when an entity is being duplicated. Should implement Espo\\Core\\Record\\Duplicator\\FieldDuplicator."
|
||||
},
|
||||
"optimisticConcurrencyControlIgnore": {
|
||||
"type": "boolean",
|
||||
"description": "Ignore optimistic concurrency control."
|
||||
},
|
||||
"additionalAttributeList": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user