I got a table that saves executed purchase orders. For a report I want to have the last 50 created purchase orders (the table’s ID field is good to identify those) listed in ascending order.
I tried
a = Order.limit(50).order("id desc").order("id asc")
but that didnt work, neither did
a = (Order.limit(50).order("id desc")).order("id asc")
nor
a = Order.limit(50).order("id desc")")
b = a.order("id asc")
The same query as from Mischa’s answer.