简体   繁体   中英

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?

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 :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM