0

I'm implementing queries to datastore in Go, but the inequality operator is not working as expected.

Here's my code

query2 := datastore.NewQuery(MetaData)
if !hasAccess {
    for _, zone := range filters.Zones {
        query2 = query2.Filter("Zone <", zone)
        query2 = query2.Filter("Zone >", zone)
    }
}

The result always returns nil even though I have data in datastore that matches that criteria (Zone != zone).

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
avillagomez
  • 443
  • 1
  • 8
  • 18
  • per documentation you cant have more than one inequality – Zig Mandel May 19 '16 at 01:45
  • Possible duplicate of [how to effectively run two inequality filters on queries in app engine](http://stackoverflow.com/questions/3021030/how-to-effectively-run-two-inequality-filters-on-queries-in-app-engine) – Zig Mandel May 19 '16 at 01:47

0 Answers0