R
R
ragnar_ok2019-09-02 21:28:43
1C-Bitrix
ragnar_ok, 2019-09-02 21:28:43

What's the difference between ORM entity and Highload?

What's the difference between ORM entity and Highload? The fact that an ORM entity can be created not only on the basis of a Highload block, but also an info block? What else? When should you use Highload, and when should you use an ORM entity? So far, I can not catch the difference between the entity received by the call Highloadblock\HighloadBlockTable::compileEntityand the ORM entity.
I read the documentation, generated an entity, used CRUD methods, but so far I can’t sort everything out. The documentation says only: "Highloadblock is a layer between the user and the ORM" .
Another question: Am I using the CRUD methods correctly? I have to provide an annotation so that the IDE understands that DataManager methods are being used.

/**
 *   @var $book Bitrix\Main\ORM\Data\DataManager
 */
$book = new BookTable();
$result = $book ::add([
    'ISBN' => '978-0321127426',
]);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-09-02
@ragnar_ok

Highload is just an interface for creating tables through the admin panel.
ORM is a utility for working with a database. It can be used with any table in the database.
The class for working with highloads is inherited from ORM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question