You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and then reverse the results to get the most recent items.
I'm not sure if i'm doing something wrong, but i spent a couple hours on this and didn't find a good solution.
Please close if this is "as designed." But, to me, it seems the order is applied AFTER the what is applied. The what is actually the ordering, and the order is what's done after the selection based on the count and what.
The text was updated successfully, but these errors were encountered:
wflanagan
changed the title
Mail.find(keys: "ALL", order: :desc, count: 20, what: :first) doesn't return the most 20 recent items.
Mail.find(keys: "ALL", order: :desc, count: 20, what: :first) doesn't return the most 20 recent messages.
Apr 19, 2024
When I do this query:
it's logical to me that it would return the 20 most recent items. But, it doesn't. It returns the 20 oldest.
To get the 20 most recent, and to thus implement some sort of hacky pagination, I have to do:
and then reverse the results to get the most recent items.
I'm not sure if i'm doing something wrong, but i spent a couple hours on this and didn't find a good solution.
Please close if this is "as designed." But, to me, it seems the
order
is applied AFTER thewhat
is applied. Thewhat
is actually the ordering, and theorder
is what's done after the selection based on the count and what.The text was updated successfully, but these errors were encountered: