Answer the question
In order to leave comments, you need to log in
Bitrix ORM getList how to use data_doubling?
I have described an entity; it has a reference field PROFESSION.
I do getList with parameters:
$arFields = [
'filter' => ['!PROFESSION.ID'=>false],
'select' => ['NAME','ID'],
'data_doubling' => false
];
$res = BranchTable::getList($arFields);
Answer the question
In order to leave comments, you need to log in
for data_doubling = false to work, there must be an indication of the relationship in the description of the entity, in your case apparently OneToMany
Example
new \Bitrix\Main\ORM\Fields\Relations\OneToMany('PROFESSION', \Bitrix\Iblock\SectionTable::class, 'IBLOCK_SECTION')
$result = \Bitrix\Iblock\SectionTable::getList([
'filter' => ['IBLOCK_ID' => 2, '!PROFESSION.ID' => false],
'select' => ['NAME'],
'data_doubling' => false
])->fetchAll();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question