EAV collections work with attributes, the sorting method is a little different here as well $componentQuantityCollection->addAttributeToSort('sku', 'ASC');.
FROM `eav_attribute` AS `main_table` ORDER BY attribute_id DESC. So you were on the right path, just Magento was doing its level best to ...
I hope after reading this post, you will be able to apply the appropriate method in a specific situation in reality. Previous Get Product Collection by Category ID.
... order rather then Magento setOrder method $colection->getSelect()->order(..) Example: ->order(array('line_items_per_product DESC', ...
However regardless of which piece of code I use (below) the order remains id ASC and not id DESC. I have tried Google and stack overflow ...
The sort attribute allows you to specify which field or fields to use for sorting the results. If you specify more than one field, Magento sorts by the first field listed.
5 ) ORDER BY feed_id DESC ) AS t1 GROUP BY position limit 0,5"; ...
magento 2 collection order by asc and desc example - It is very simple to set order by clause in Magento 2. We can use setOrder ASC or DESC ...
In this post Adam looks at how to load, filter and sort your Magento
Parse Tree is a set of two simple structures which allow to encode any expression. All other expressions are build on top of these structures. constant value.