Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting on number field db4o Android

I am using db4o database for storing data in my Android application. I want to sort objects on Number field.

But, when I use query.descend("number").orderDescending();, I am getting NullPointerException.

Why?

like image 254
Unnati Avatar asked Dec 03 '25 14:12

Unnati


1 Answers

Finally, solved problem.

Actually the problem was number was stored in format double exponential. Then I converted the number in long and the problem is gone :-)

like image 85
Unnati Avatar answered Dec 06 '25 04:12

Unnati