P
P
photosho2019-09-19 13:51:58
1C-Bitrix
photosho, 2019-09-19 13:51:58

Why is the element duplicated when reading a multiple property?

There is a multiple property of type "Binding to sections". When reading elements using "CIBlockElement::getList()" if the property contains multiple values, the element is duplicated:

while ($item = $result->fetch())
    $elements[] = $item;

Weird, this is the first time I've noticed this. Is there any standard setting that allows you to group property values ​​in one element, like in $arResult of the same news.list, for example? Something like that:
item = [
    'PROPERTIES' = [
        'PROP' => [
            'VALUE' = [23, 64, 41]
        ]
    ]
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2019-09-19
@photosho

If I remember correctly, then you need to change the storage location of the properties, transfer them to a separate table. Then there will be no problem with multiple properties.
5d8361af3ff1e870356202.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question