Answer the question
In order to leave comments, you need to log in
Bitrix ORM: How to import several thousand elements into an infoblock?
I am implementing the import of several thousand elements into the infoblock.
I'm trying to use Bitrix ORM - the ElementTable::add();
output is: To add infoblock elements, use the CIBlockElement::Add() call .
I understand that you can get rid of the method add()
that is overridden in ElementTable ( displays an error ) and work with D7 tools with infoblock tables bitrix/modules/iblock/lib/element.php
. But for some reason, the developers of Bitrix decided to abandon it? It turns out you need to use the old one CIBlockElement::Add()
without options?
How to implement import step by step? Is there any analogue of Batch Processing from Doctrine?
In short, how to optimize this:
foreach ($itemArray as $item) {
CIBlockElement::Add($item, false, false, false);
}
Answer the question
In order to leave comments, you need to log in
But for some reason, the developers of Bitrix decided to abandon it?
As a workaround, you can inherit from ElementTable and override the add method in your class, and then implement your own addition
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question