CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 11: Magento 2 Certified Associate Developer

Assume that $collection is a new instance of a class that extendsMagento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?

Nội dung câu hỏi

Assume that $collection is a new instance of a class that extendsMagento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. $collection->addFieldToFilter('record_id',['in'=>$ids]); B. — đáp án hiện tạiLựa chọn A
  2. B. $collection->in($ids);
  3. C. $collection->filterIn($ids);

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề