EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Use entity::setMulltiple
Yurii80c703af6520
diff --git a/application/Espo/Core/Action/Actions/Merge/Merger.php b/application/Espo/Core/Action/Actions/Merge/Merger.phpindex 605fca61ac..36208fe128 100644--- a/application/Espo/Core/Action/Actions/Merge/Merger.php+++ b/application/Espo/Core/Action/Actions/Merge/Merger.php@@ -105,7 +105,7 @@ class Merger$service->filterUpdateInput($clonedData);- $entity->set($clonedData);+ $entity->setMultiple($clonedData);$this->unsetNotActualAttributes($entity);diff --git a/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php b/application/Espo/Core/FieldProcessing/EmailAddress/Saver.phpindex 33cae4b1ef..19e55cbe74 100644--- a/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php+++ b/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php@@ -334,7 +334,7 @@ class Saver implements SaverInterface$entityEmailAddress = $this->entityManager->getNewEntity('EntityEmailAddress');- $entityEmailAddress->set([+ $entityEmailAddress->setMultiple(['entityId' => $entity->getId(),'entityType' => $entity->getEntityType(),'emailAddressId' => $emailAddress->getId(),diff --git a/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php b/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.phpindex 6f91d6eaeb..1c15330343 100644--- a/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php+++ b/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php@@ -336,7 +336,7 @@ class Saver implements SaverInterface$entityPhoneNumber = $this->entityManager->getNewEntity('EntityPhoneNumber');- $entityPhoneNumber->set([+ $entityPhoneNumber->setMultiple(['entityId' => $entity->getId(),'entityType' => $entity->getEntityType(),'phoneNumberId' => $phoneNumber->getId(),diff --git a/application/Espo/Core/Repositories/Database.php b/application/Espo/Core/Repositories/Database.phpindex 4b1f773549..78aa6be5b3 100644--- a/application/Espo/Core/Repositories/Database.php+++ b/application/Espo/Core/Repositories/Database.php@@ -366,7 +366,7 @@ class Database extends RDBRepositoryprotected function afterSave(Entity $entity, array $options = []){if (!empty($this->restoreData)) {- $entity->set($this->restoreData);+ $entity->setMultiple($this->restoreData);$this->restoreData = null;}diff --git a/application/Espo/ORM/EntityCollection.php b/application/Espo/ORM/EntityCollection.phpindex bd650fa217..b846b8c450 100644--- a/application/Espo/ORM/EntityCollection.php+++ b/application/Espo/ORM/EntityCollection.php@@ -252,7 +252,7 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess,/** @var TEntity $entity */$entity = $this->entityFactory->create($this->entityType);- $entity->set($dataArray);+ $entity->setMultiple($dataArray);if ($this->isFetched) {$entity->setAsFetched();diff --git a/application/Espo/ORM/EntityManager.php b/application/Espo/ORM/EntityManager.phpindex a3ec089acd..fb451c6ac3 100644--- a/application/Espo/ORM/EntityManager.php+++ b/application/Espo/ORM/EntityManager.php@@ -303,7 +303,7 @@ class EntityManager}}- $entity->set($fetchedMap);+ $entity->setMultiple($fetchedMap);$entity->setAsFetched();}@@ -316,7 +316,7 @@ class EntityManagerpublic function createEntity(string $entityType, $data = [], array $options = []): Entity{$entity = $this->getNewEntity($entityType);- $entity->set($data);+ $entity->setMultiple($data);$this->saveEntity($entity, $options);return $entity;diff --git a/application/Espo/ORM/Mapper/BaseMapper.php b/application/Espo/ORM/Mapper/BaseMapper.phpindex 9ae9521629..b835861de1 100644--- a/application/Espo/ORM/Mapper/BaseMapper.php+++ b/application/Espo/ORM/Mapper/BaseMapper.php@@ -1583,7 +1583,7 @@ class BaseMapper implements RDBMapper*/private function populateEntityFromRow(Entity $entity, $data): void{- $entity->set($data);+ $entity->setMultiple($data);}/**diff --git a/application/Espo/ORM/SthCollection.php b/application/Espo/ORM/SthCollection.phpindex 8117dbfecc..7e4dbb7975 100644--- a/application/Espo/ORM/SthCollection.php+++ b/application/Espo/ORM/SthCollection.php@@ -85,7 +85,7 @@ class SthCollection implements Collection, IteratorAggregate, Countablewhile ($row = $this->fetchRow()) {$entity = $this->entityManager->getEntityFactory()->create($this->entityType);- $entity->set($row);+ $entity->setMultiple($row);$entity->setAsFetched();$this->prepareEntity($entity);diff --git a/application/Espo/ORM/Value/ValueAccessor.php b/application/Espo/ORM/Value/ValueAccessor.phpindex 840be59a6c..37daa74d36 100644--- a/application/Espo/ORM/Value/ValueAccessor.php+++ b/application/Espo/ORM/Value/ValueAccessor.php@@ -66,6 +66,6 @@ class ValueAccessor{$attributeValueMap = $this->extractor->extract($this->entity->getEntityType(), $field, $value);- $this->entity->set($attributeValueMap);+ $this->entity->setMultiple($attributeValueMap);}}diff --git a/application/Espo/Tools/Dashboard/Service.php b/application/Espo/Tools/Dashboard/Service.phpindex da7d1878ba..e3fe86624f 100644--- a/application/Espo/Tools/Dashboard/Service.php+++ b/application/Espo/Tools/Dashboard/Service.php@@ -130,7 +130,7 @@ class Serviceprivate function applyTemplate(Entity $preferences, DashboardTemplate $template, bool $append): void{if (!$append) {- $preferences->set([+ $preferences->setMultiple(['dashboardLayout' => $template->get('layout'),'dashletsOptions' => $template->get('dashletsOptions'),]);@@ -168,7 +168,7 @@ class Service$dashletsOptions->$id = $item;}- $preferences->set([+ $preferences->setMultiple(['dashboardLayout' => $dashboardLayout,'dashletsOptions' => $dashletsOptions,]);diff --git a/application/Espo/Tools/MassUpdate/Processor.php b/application/Espo/Tools/MassUpdate/Processor.phpindex 3a8f608fe4..01724a1616 100644--- a/application/Espo/Tools/MassUpdate/Processor.php+++ b/application/Espo/Tools/MassUpdate/Processor.php@@ -192,7 +192,7 @@ class Processorreturn false;}- $entity->set($values);+ $entity->setMultiple($values);try {$service->processValidation($entity, $values);