sdepold/sequelize — Issue #119: items not being returned in the correct order
Author: BrianTheCoder
Created: 2012-01-10 22:30:57+00:00
State: open

So I'm doing a simple call. Something to the extent of:

Item.find(order: 'created_at DESC', limit: 10)

which executes:

Executing: SELECT * FROM `items` ORDER BY created_at DESC LIMIT 10;

but when I print out the ids and their created at time as a unix timestamp, I get the following.

node-10-1326234047
-
node-8-1326234041
-
node-9-1326234044
-
node-6-1326234036
-
node-5-1326234034
-
node-4-1326234031
-
node-7-1326234039
-
node-3-1326234029
-
node-1-1326234022
-
node-2-1326234025

So not are they not only returned in the wrong order, they're essentially returned in no order at all. Am I missing something here?