2

I know I can do

myBox.query().less(BasicAchievement_.currentSteps, 5);

But I want to be able to do

myBox.query().less(BasicAchievement_.currentSteps, BasicAchievement_.totalSteps)

Is this possible? I assume it would be. If not, can I join two 'tables' together (I can only really think in SQL terms, sorry)

I guess I'm asking for the equivalent of

SELECT * FROM myTable WHERE currentSteps < totalSteps;
Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57

1 Answers1

1

You can use Java based query filters for that. Example:

query.filter((object) -> {
     return object.currentSteps < object.totalSteps;
})

We also opened a feature request to have that at the DB query engine.

Markus Junginger
  • 6,950
  • 31
  • 52