0

I saved a StackMobModel object to the server and its data appears on the stackmob site correctly. I am able to query for all of the fields except for booleans (ex: new StackMobQuery().fieldIsGreaterThanOrEqualTo("age",20) )

All of the query types seem to take a String for the field name and either a String or int for the value to compare against. How can I query for boolean fields?

It is possible to go through the returned list and manually compare the boolean field to the desired one and create a new filtered list but this defeats the purpose of having a specific query.

Edit: also, how do you query for longs?

Reed B
  • 636
  • 1
  • 8
  • 19

1 Answers1

0

Nevermind. What you have to do is add a StackMobQueryField via the field() method.

.field(new StackMobQueryField("date").isGreaterThanOrEqualTo(date))

This has more options than the built-in field comparisons.

Reed B
  • 636
  • 1
  • 8
  • 19