android - ParseQuery with whereNear() ignores others conditions -
the query below utterly ignoring second condition (the filter
, string field).
but when wherenear()
condition commented, filter applied.
does wherenear()
condition cause ignore others conditions? if yes, correct approach in case?
parsequery<parseobject> query = parsequery.getquery("post"); query.wherenear("location", new parsegeopoint(latitude, longitude)); query.whereequalto("filter", filter); query.orderbydescending("createdat"); list<parseobject> objects = query.find()
from parse documentation,
if additional orderbyascending()/orderbydescending() constraint applied wherenear(), take precedence on distance ordering.
so, wherenear()
won't override orderbydescending()
. other way around. also,
using
wherenear()
constraint limit results within 100 miles.
if there no points nearby given point within 100 miles satisfy second filter. think that's why getting unexpected results.
Comments
Post a Comment