How do you select a list of records from the database where the record ids are in the $ids list?
Assume that $collection is a new instance of a class that extends MagentoFrameworkModelResourceModelDbCollectionAbstractCollection, 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?
A . $collection->addFieldToFilter(‘record_id’,[‘in’=>$ids]);
B .
C . $collection->in($ids);
D . $collection->filterIn($ids);
Answer: A
Explanation:
Reference: https://magento.stackexchange.com/questions/121040/how-to-get-product-collections-by-setof-ids-in-magento-2
Latest Magento 2 Certified Associate Developer Dumps Valid Version with 103 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments