Метод merge

public

Сигнатура метода

public function merge(array $fields): void

Возвращает: void

Описание

Merges the row addressed by its composite key in one statement: it is inserted when the key is free and rewritten when it is taken, and either way the row keeps the identifier it has. This is the write of the legacy path, where an address of an already occupied type is silently overwritten. Asking the unique key that question with an insert and a caught duplicate instead would take two statements over one index record and hold the locks of both until the commit. A caller that has to learn about the taken key writes through {@see self::add()}. The merge names no identifier of the row it wrote, and no caller of this line asks for one. A storage refusing the statement leaves as an exception, exactly as it did on the legacy path.

Параметры

1
Имя Тип По умолчанию Флаги
$fields array —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/V2/Internal/Repository/Address/AddressRepository.php
Расположение метода в файле
Строки 282–285

Исходный код

PHP