Valid AD0-E717 Dumps shared by ExamDiscuss.com for Helping Passing AD0-E717 Exam! ExamDiscuss.com now offer the newest AD0-E717 exam dumps, the ExamDiscuss.com AD0-E717 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com AD0-E717 dumps with Test Engine here:
Which two methods add sorting to collections inherited from the \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class? (Choose two.)
Correct Answer: A,D
The two methods that add sorting to collections inherited from the \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class are setOrder and addOrder. These methods allow adding one or more order clauses to a collection query. The setSorting and addSorting methods do not exist in Adobe Commerce. Verified Reference: [Adobe Commerce Developer Guide - Collections] In Magento 2, collections inherited from \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class can be sorted using the setOrder and addOrder methods. The setOrder method is used to set the order for a field in the collection, specifying the field by which to sort and the direction of the sorting (ASC or DESC). The addOrder method is similar but allows for adding multiple sorting orders to the collection, enabling more complex sorting scenarios. There are no setSorting or addSorting methods in the standard Magento 2 collection classes.