Knotis / djangocassandra

Cassandra support for the Django web framework
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Paging/slicing/limiting doesn't work with order_by #62

Open sethdenner opened 8 years ago

sethdenner commented 8 years ago

Assuming column "b" is the first column in your column family's clustering key; if you make a query like:

model.objects.filter(a='foo').order_by('-b')[:3]

It seems that the results don't honor the order_by since they come back in the original order as stored in the database and not reversed.

sethdenner commented 8 years ago

order_by works correctly if you do not slice the queryset.