Sort db4o Android on numeric fields
I’m using a db4o database to store data in my Android application. I want to sort the objects in the Number field.
However, when I use
query.descend("number").orderDescending(); , I got
Finally solved the problem.
In fact, the problem is that the numbers are stored in a double-exponential format. Then I convert the number to long and the problem disappears :-).