thiagolocatelli / parse4j

Java Library to deal with Parse (parse.com) REST API
http://thiagolocatelli.github.io/parse4j
143 stars 117 forks source link

Cannot multi- order ParseQuery with ascending and descending keys with "createdAt" #47

Open fahadzafar opened 9 years ago

fahadzafar commented 9 years ago

So trying to sort Ascending w.r.t createdAt but Descending wtr ANOTHER_KEY.

now if i call parseQuery.orderByDescending("createdAt,ANOTHER_KEY"), everything is fine, but if i do parseQuery.orderByDescending("ANOTHER_KEY"), parseQuery.addOrderByAscending("createdAt")

it throws a parse exception from the parseserver saying createdAt is not a valid order key.

I looked at the source, for the REST api, you simply add the key with a '-' sign for descending so why is this happening ?