-
Apr 5th, 2011, 12:34 PM
#1
spring-data mongodb and sorting with multiple fields
I have two fields I want to sort with
(order by clicks descending, date descending)
query.sort().on("clicks", Order.DESCENDING);
query.sort().on("date", Order.DESCENDING);
With this it won't work, date is always messing the whole sort. Both work separately, but not together. I might be doing this the wrong way, but didn't come up with anything else.
Is anyone else doing something like this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules