ExamGecko
Question list
Search
Search

Question 34 - AD0-E711 discussion

Report
Export

How should a developer associate a resource model inherited from the \Magento\Framework\Model\ResourceModel\Db\AbslractDb class with a corresponding table in the database?

A.
Pass the table name to the "table" property.
Answers
A.
Pass the table name to the "table" property.
B.
Pass the table name to the "_init" method.
Answers
B.
Pass the table name to the "_init" method.
C.
Specify the table name in the Ob_schema.xml file
Answers
C.
Specify the table name in the Ob_schema.xml file
Suggested answer: B

Explanation:

To associate a resource model inherited from the

\Magento\Framework\Model\ResourceModel\Db\AbstractDb class with a corresponding table in the database, the developer should pass the table name to the "_init" method. This method is called during the construction of the resource model and sets the table name for the model.

asked 02/10/2024
Ah Say
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first