merge in transaction

This commit is contained in:
Yurii
2026-02-26 16:57:41 +02:00
parent 0368d0569c
commit 29a5d39768
@@ -64,8 +64,21 @@ class Merger
* @param string[] $sourceIdList
* @throws NotFound
* @throws Forbidden
* @noinspection PhpDocRedundantThrowsInspection
*/
public function process(Params $params, array $sourceIdList, stdClass $data): void
{
$this->entityManager->getTransactionManager()->run(function () use ($params, $sourceIdList, $data) {
$this->processInternal($params, $sourceIdList, $data);
});
}
/**
* @param string[] $sourceIdList
* @throws NotFound
* @throws Forbidden
*/
private function processInternal(Params $params, array $sourceIdList, stdClass $data): void
{
$clonedData = ObjectUtil::clone($data);