Edit New issue SetDescending not working with List<Object> query android

#1

greetings!
My listview is not descending by key order(setdescending(true)) when I use java.util.List object to query a Couch db view . It works perfectly without the java.util.List object. Here is my gist https://gist.github.com/mikekaraa/b8c29721de3077bd8630

Please help me out if you have a solution

#2

Hi @mikekara,

Is it because the code only set key with name variable?

java.util.List<Object> keys = new ArrayList<Object>();
keys.add(name);
keys.add(name);
query.setKeys(keys);
#4

@mikekara it appears that you’ve linked to your gist twice, and said gist doesn’t contain the map function…
@hideki was wondering why you add name variable to keys collection twice.

(note: your account was flagged and message hidden because as a new user you reposted a link to the same doamin, actually the same link, twice… it appears that you made several quick attempts to do so as well)

#5

Hi @mikekara,
Your map function looks fine. As you set only one key (name) by Query.setKeys(), so setDescending() does not have any effects for your results. Hope this helps you understand.
Thanks,
Hideki

#6

Hi All,

For me also there is problem for get documents in setdescending(true). For more explanation.

https://groups.google.com/forum/#!topic/mobile-couchbase/3lLV7QG0yBI

Thanks