• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/internal/model.php
  • Класс: BitrixReportVisualConstructorInternalModel
  • Вызов: Model::saveOneToManyReferences
private function saveOneToManyReferences($references, $assoc, $ownerEntityId)
{
	foreach ($references as $key => $reference)
	{
		if ($reference instanceof $assoc['targetEntity'])
		{
			$mapReferenceAttributes = $reference::getMapReferenceAttributes();
			$reference->{$mapReferenceAttributes[$assoc['mappedBy']]['join']['field'][0]} = $ownerEntityId;
			$reference->save();
		}

	}
}