• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/model/hierarchytable.php
  • Класс: BitrixLocationModelHierarchyTable
  • Вызов: HierarchyTable::getMap
static function getMap()
{
	return array(

		(new FieldsIntegerField('ANCESTOR_ID'))
			->configurePrimary(true),

		(new FieldsIntegerField('DESCENDANT_ID'))
			->configurePrimary(true),

		(new FieldsIntegerField('LEVEL'))
			->configureRequired(true),

		// References

		(new Reference('ANCESTOR', LocationTable::class,
			Join::on('this.ANCESTOR_ID', 'ref.ID')))
			->configureJoinType('inner'),

		(new Reference('DESCENDANT', LocationTable::class,
			Join::on('this.DESCENDANT_ID', 'ref.ID')))
			->configureJoinType('inner')
	);
}