How can I order parse objects with two layer system?
For example I wanna get Comments by their vote count. But I wanna order comments by date when two comment has same vote count. For example:
Comment1 = 45 votes and published 5 days ago
Comment2 = 12 votes and published 10 days ago
Comment3 = 12 votes and published 3 days ago
I wanna order this comment like this
1 - Comment 1 (because it has most votes)
2 - Comment 3 (Comment 3 has same votes with Comment 2 but since comment 3 is newer. I wanna get it first)
3 - Comment 2
Is this posibble?
I want something like this
ParseQuery<Comment> getComments = new ParseQuery<Comment>(Comment.class); getComments.orderByDescending("votecount");//Query should consider this first but if they have equal vote then order them by date getComments.orderByDescending("createdAt");//This should be ignored untill vote count is equal